Re: libetpan with openssl on windows

DINH Viet Hoa <[email protected]> Sat, 22 Apr 2006 15:22:15 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <etPan.444a2e07.19781b2f.580e@utopia>
Michael Leupold wrote :

> I just compiled libetpan with openssl on windows (MSVC). Actually most things 
> seem to work, but I have two issues I can't resolve:
> 
> 1. mailstream_ssl.c uses fcntl in mailstream_prepare_fd to set the socket to 
> non-blocking mode. Unfortunately fcntl isn't available on windows and I 
> haven't found any usable replacement. So is just enclosed the function with 
> defines so it only returns 0 on compiling with msvc.
> As I haven't looked at the mailstream-code I wonder if this may break anything 
> or if it's just detrimental to performance (or none of the two)? So far it 
> seems to work...
> 
> 2. mailstream_ssl.c uses close(ssl_data->fd) to close the socket on windows 
> which doesn't seem to be the correct way. Looking at mailstream_socket.c, 
> closesocket is used there. Changing mailstream_ssl.c accordingly works.
> 
> After making the changes, everything seems to work so far (haven't tested std 
> imap with starttls though).

that's ok for me but still I can't remember why I put sockets on 
non-blocking mode in SSL stream.

Could you show the patch before applying it ?

-- 
DINH V. Hoa,

"c'est stressant comme taf" -- coin
signature.asc (application/pgp-signature, 0 B)