leitang / iksemel

Automatically exported from code.google.com/p/iksemel
GNU Lesser General Public License v2.1
0 stars 0 forks source link

iks_recv timeout with TLS doesn't work correctly #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current trunk code doesn't handle correctly the timeout parameter. When
the timeout expires, "tls_pull" returns 0 (the number of read bytes) but
gnutls interpreters it as the TCP connection was closed. 

To make it behave correctly you have to use errno EAGAIN when returning
from "tls_pull". This change has been made directly to the "io_recv" so
that it behaves correctly in any situation (with or without TLS).

A patch (against r25) is attached to correct this wrong behaviour. It
should be correct.

I see there is a similar problem (with patch) in Issue 10, but the one
attached here is against current trunk.

Original issue reported on code.google.com by emanuele...@mobimesh.it on 4 Nov 2009 at 11:34

Attachments: