New patch for qt-copy: fix QSslSocket::waitForBytesWritten(-1)
Thiago Macieira
thiago at kde.org
Mon Nov 19 21:31:17 GMT 2007
Andreas Hartmetz wrote:
>Am Sonntag 18 November 2007 05:27:12 schrieb Andreas Hartmetz:
>> Hi,
>>
>> During my work on a replacement for KSSL I discovered a bug in
>> QSslSocket. After much trial and error I realized that while
>> QSslSocket::bytesToWrite() may not be perfectly reliable, it is also
>> unnecessary if
>> waitForBytesWritten(-1) works right.
>> The patch fixes the bug that QSslSocket::waitForBytesWritten(-1) does
>> the same thing as waitForBytesWritten(0). What should happen for -1 is
>> that it waits until some data (in the actual implementation, all data)
>> has been transferred to the OS socket. For 0, it just waits for zero
>> milliseconds. The bug only triggers when using an encrypted
>> connection.
>> The fix is to make the timeout behavior of QSslSocket imitate that of
>> QAbstractSocket, and by imitate I mean use the same code.
>> It's a small change that /looks/ harmless.
>> Thiago had a quick look and approved of the fix, although he (just
>> like me) probably didn't do a full investigation; the socket code
>> consists of many interacting classes...
>
>patch committed to qt-copy.
And committed to Qt 4.4.0.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071119/ab080a0e/attachment.sig>
More information about the kde-core-devel
mailing list