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

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 29 19:41:01 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/d475e17d01a3
changeset: 8986:d475e17d01a3
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 f43bebab3dac -r d475e17d01a3 src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c	Tue Apr 28 22:31:40 2009 -0400
+++ b/src/login-common/ssl-proxy-openssl.c	Wed Apr 29 12:40:48 2009 -0400
@@ -50,7 +50,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;
@@ -420,8 +420,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