dovecot-2.0: ssl-proxy: Crashfix to previous commit.

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 29 20:37:28 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/39565c3eb1b3
changeset: 9166:39565c3eb1b3
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 29 12:40:48 2009 -0400
description:
ssl-proxy: Crashfix to previous commit.

diffstat:

1 file changed, 6 insertions(+), 4 deletions(-)
src/login-common/ssl-proxy-openssl.c |   10 ++++++----

diffs (34 lines):

diff -r 96678e83eab6 -r 39565c3eb1b3 src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c	Tue Apr 28 22:55:03 2009 -0400
+++ b/src/login-common/ssl-proxy-openssl.c	Wed Apr 29 12:40:48 2009 -0400
@@ -51,7 +51,7 @@ struct ssl_proxy {
 	unsigned int sslout_size;
 
 	ssl_handshake_callback_t *handshake_callback;
-	void *handshake_callback_context;
+	void *handshake_context;
 
 	char *last_error;
 	unsigned int handshaked:1;
@@ -421,8 +421,10 @@ static void ssl_handshake(struct ssl_pro
 	ssl_set_io(proxy, SSL_ADD_INPUT);
 	plain_block_input(proxy, FALSE);
 
-	if (proxy->handshake_callback(proxy->handshake_callback_context) < 0)
-		ssl_proxy_destroy(proxy);
+	if (proxy->handshake_callback != NULL) {
+		if (proxy->handshake_callback(proxy->handshake_context) < 0)
+			ssl_proxy_destroy(proxy);
+	}
 }
 
 static void ssl_read(struct ssl_proxy *proxy)
@@ -567,7 +569,7 @@ int ssl_proxy_client_new(int fd, struct 
 		return -1;
 
 	(*proxy_r)->handshake_callback = callback;
-	(*proxy_r)->handshake_callback_context = context;
+	(*proxy_r)->handshake_context = context;
 	(*proxy_r)->client = TRUE;
 	ssl_step(*proxy_r);
 	return ret;


More information about the dovecot-cvs mailing list