problem: mailstream_low_socket_write() and Win32

"Osadchuk, Vasily" <Osadchuk-97vdVvB1/[email protected]> Wed, 12 Sep 2007 11:25:58 +0300
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Hi,

problem using libetpan-0.52 under Win32:

description:
when trying out readmsg test, mailfolder_connect() always returned
MAIL_ERROR_STREAM.

details:
if dig deeper, we can see that inside mailstream_low_socket_write(),
[cancelled] local variable can be set to non-zero value (equal to
decimal value of handle returned by CreateEvent() - mailstream_socket.c,
line 288). Later, there is a check in the code - if (cancelled) then
return -1. Thus, it always returns -1.

workaround/solution
if user doesn't need cancellation support, setting [cancelled] to 0
instead of fds_read.fd_array[r - WAIT_OBJECT_0] will work for him.
Otherwise, further investigation and full-fledged fix is necessary for
this.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/