[dovecot-cvs] dovecot/src/login-common ssl-proxy-openssl.c, 1.41, 1.42

cras at dovecot.org cras at dovecot.org
Mon Jul 24 02:32:14 EEST 2006


Update of /var/lib/cvs/dovecot/src/login-common
In directory talvi:/tmp/cvs-serv28822

Modified Files:
	ssl-proxy-openssl.c 
Log Message:
Use SSL_pending() to figure out if we should call SSL_read() again.
Otherwise it breaks..    



Index: ssl-proxy-openssl.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy-openssl.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- ssl-proxy-openssl.c	23 Jul 2006 23:19:03 -0000	1.41
+++ ssl-proxy-openssl.c	23 Jul 2006 23:32:11 -0000	1.42
@@ -371,7 +371,7 @@
 		proxy->ssl_want_size = 0;
 	}
 
-	for (;;) {
+	do {
 		ret = SSL_read(proxy->ssl, buf, size);
 		if (ret <= 0) {
 			ssl_handle_error(proxy, ret, "SSL_read()",
@@ -385,7 +385,7 @@
 
 		if (proxy->sslout_size > 0)
 			ssl_output(proxy);
-	}
+	} while (SSL_pending(proxy->ssl) > 0);
 }
 
 static void ssl_output(struct ssl_proxy *proxy)



More information about the dovecot-cvs mailing list