From: SourceForge.net <no...@so...> - 2009-12-19 00:57:59
|
Bugs item #2897095, was opened at 2009-11-13 10:29 Message generated for change (Settings changed) made by hoa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429696&aid=2897095&group_id=41064 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SMTP Group: None Status: Open >Resolution: Fixed Priority: 5 Private: No Submitted By: Sergey Perminov (perminov) Assigned to: Nobody/Anonymous (nobody) Summary: Incorrect close of socket on windows in SMTP over TLS Initial Comment: Look at src/data-types/mailstream_ssl.c #ifndef USE_GNUTLS static void ssl_data_close(struct mailstream_ssl_data * ssl_data) { SSL_free(ssl_data->ssl_conn); ssl_data->ssl_conn = NULL; SSL_CTX_free(ssl_data->ssl_ctx); ssl_data->ssl_ctx = NULL; close(ssl_data->fd); ssl_data->fd = -1; } #else On Windows close should be replaced with closesocket() like it's done in src/data-types/mailstream_socket.c I looked over the code and found some more incorrect closes of TCP socket . like in src/data-types/mailstream_ssl.c src/low-level/imap/mailimap_socket.c src/low-level/imap/mailimap_ssl.c src/low-level/nntp/newsnntp_socket.c src/low-level/nntp/newsnntp_ssl.c src/low-level/pop3/mailpop3_socket.c src/low-level/pop3/mailpop3_ssl.c src/low-level/smtp/mailsmtp_socket.c On windows this incorrect call of close() on TCP socket leads to runtime error and application termination. PS: close() call in src/low-level/smtp/mailsmtp_socket.c is a very rear case but close() in src/data-types/mailstream_ssl.c called on termination of every connection and definitely should be fixed. ---------------------------------------------------------------------- >Comment By: DINH V. Hoa (hoa) Date: 2009-12-19 01:57 Message: fixed in libetpan-0.58cvs10 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429696&aid=2897095&group_id=41064 |