[dovecot-cvs] dovecot/src/login-common ssl-proxy-openssl.c, 1.46, 1.47

tss at dovecot.org tss at dovecot.org
Fri Oct 13 21:06:48 UTC 2006


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

Modified Files:
	ssl-proxy-openssl.c 
Log Message:
New asserts / cleanup



Index: ssl-proxy-openssl.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy-openssl.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- ssl-proxy-openssl.c	16 Aug 2006 12:16:25 -0000	1.46
+++ ssl-proxy-openssl.c	13 Oct 2006 20:06:46 -0000	1.47
@@ -454,6 +454,8 @@
 	SSL *ssl;
 	int sfd[2];
 
+	i_assert(fd != -1);
+
 	*proxy_r = NULL;
 
 	if (!ssl_initialized) {
@@ -475,7 +477,7 @@
 		return -1;
 	}
 
-	if (socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) == -1) {
+	if (socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) < 0) {
 		i_error("socketpair() failed: %m");
 		SSL_free(ssl);
 		return -1;



More information about the dovecot-cvs mailing list