"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ne_socket.c" between
neon-0.31.1.tar.gz and neon-0.31.2.tar.gz

About: neon is an HTTP and WebDAV client library, with a C interface.

ne_socket.c  (neon-0.31.1):ne_socket.c  (neon-0.31.2)
skipping to change at line 1976 skipping to change at line 1976
va_start(params, format); va_start(params, format);
ne_vsnprintf(sock->error, sizeof sock->error, format, params); ne_vsnprintf(sock->error, sizeof sock->error, format, params);
va_end(params); va_end(params);
} }
int ne_sock_close(ne_socket *sock) int ne_sock_close(ne_socket *sock)
{ {
int ret; int ret;
/* Complete a bidirectional shutdown for SSL/TLS. */ /* Per API description - for an SSL connection, simply send the
* close_notify but do not wait for the peer's response. */
#if defined(HAVE_OPENSSL) #if defined(HAVE_OPENSSL)
if (sock->ssl) { if (sock->ssl) {
if (SSL_shutdown(sock->ssl) == 0) { SSL_shutdown(sock->ssl);
SSL_shutdown(sock->ssl); SSL_free(sock->ssl);
}
SSL_free(sock->ssl);
} }
#elif defined(HAVE_GNUTLS) #elif defined(HAVE_GNUTLS)
if (sock->ssl) { if (sock->ssl) {
do { do {
ret = gnutls_bye(sock->ssl, GNUTLS_SHUT_WR); ret = gnutls_bye(sock->ssl, GNUTLS_SHUT_WR);
} while (ret < 0 } while (ret < 0
&& (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN)); && (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN));
gnutls_deinit(sock->ssl); gnutls_deinit(sock->ssl);
} }
#endif #endif
 End of changes. 2 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)