commit b0f94fd66826b55a142edc088ad2a6415147ef3b Author: Oswald Buddenhagen <o...@kde.org> Date: Sun Mar 17 14:32:06 2013 +0100
fix crash in ssl connection error path not a good idea to invoke the callback twice ... src/socket.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/src/socket.c b/src/socket.c index cc0433f..de2f15a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -275,13 +275,7 @@ socket_start_tls( conn_t *conn, void (*cb)( int ok, void *aux ) ) static void start_tls_p2( conn_t *conn ) { - switch (ssl_return( "connect to", conn, SSL_connect( conn->ssl ) )) { - case -1: - start_tls_p3( conn, 0 ); - break; - case 0: - break; - default: + if (ssl_return( "connect to", conn, SSL_connect( conn->ssl ) ) > 0) { /* verify whether the server hostname matches the certificate */ if (verify_cert_host( conn->conf, conn )) { start_tls_p3( conn, 0 ); @@ -289,7 +283,6 @@ start_tls_p2( conn_t *conn ) info( "Connection is now encrypted\n" ); start_tls_p3( conn, 1 ); } - break; } } ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel