From: <din...@fr...> - 2007-12-10 10:05:03
|
On 12/9/07, Nigel Kerr <nig...@gm...> wrote: > good folk, > > struggling some with getting libetpan .52 to work on windows. my environ= ment: > > winxp pro > vs 2003 > openssl 0.9.8g (libeay32.lib and ssleay32.lib!) built with same > > had to #define EINPROGRESS WSAEINPROGRESS > had to remove references to unistd.h in a couple places > had to comment out a bit about feed_storage > > then it compiles: the lib, sendsmtp and readmsg. howmsoever: > > if i invoke sendsmtp thus: > > sendsmtp -f me...@gm... -u me...@gm... -v whatever -s > smtp.gmail.com -p 587 -S me...@gm... > > and a message text, i invariably get a stream error. I have tracked > it down (i think) to: > > mailstream_socket.c:mailstream_low_socket_write(), the part where > "cancelled" is tested for non-zero. cancelled is coming to us from > the win32 block above: > > event =3D CreateEvent(NULL, TRUE, FALSE, NULL); > WSAEventSelect(socket_data->fd, event, FD_WRITE | FD_CLOSE); > FD_SET(event, &fds_read); > r =3D WaitForMultipleObjects(fds_read.fd_count, fds_read.fd_array, > FALSE, timeout.tv_sec * 1000 + timeout.tv_usec / 1000); > if (r < 0) > return -1; > > cancelled =3D fds_read.fd_array[r - WAIT_OBJECT_0]; > write_enabled =3D (fds_read.fd_array[r - WAIT_OBJECT_0] =3D=3D event); > > cancelled gets a value all the time here, since > fds_read.fd_array[r-WAIT_OBJECT_0] seems to always (still?) have a > value. r is 1 in these cases, by which i take it to mean we're > sending two things in to be waited on. > > i've naively attempted to use the non-WIN32 code instead, but that > didn't get me any different: cancelled gets a value that is not zero, > and we always return. > > anyone have any insight here? i'd like to use libetpan to send email > from a windows application, but i admit i'm not so much on the socket > programming. anything i can try to debug? Hello, There are some fixes about this in the CVS HEAD of libetpan. The current CVS HEAD should be stable (a release should be planned for soon= ). Could you try the CVS ? Regards, --=20 DINH Vi=EAt Ho=E0 |