[SVN] r703 - /branches/cvsmerge/cyrus-cvs/imap/saslclient.c

debian at incase.de debian at incase.de
Tue Feb 27 04:40:58 CET 2007


Author: sven
Date: Tue Feb 27 04:40:55 2007
New Revision: 703

URL: https://mail.incase.de/viewcvs?rev=703&root=cyrus22&view=rev
Log:
don't send an empty literal when no initial response is supposed to be sent

Modified:
    branches/cvsmerge/cyrus-cvs/imap/saslclient.c

Modified: branches/cvsmerge/cyrus-cvs/imap/saslclient.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/saslclient.c?rev=703&root=cyrus22&r1=702&r2=703&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/saslclient.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/saslclient.c Tue Feb 27 04:40:55 2007
@@ -39,7 +39,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: saslclient.c,v 1.14 2006/08/30 16:29:11 murch Exp $ */
+/* $Id: saslclient.c,v 1.14.2.1 2006/12/19 14:30:28 murch Exp $ */
 
 #include <config.h>
 
@@ -217,21 +217,22 @@
 	sprintf(cmdbuf, "%s %s", sasl_cmd->cmd, mech);
     prot_printf(pout, "%s", cmdbuf);
 
-    if (clientout) { /* initial response */
-	if (!clientoutlen) { /* zero-length initial response */
-	    prot_printf(pout, " =");
-
-	    clientout = NULL;
-	}
-	else if (!sendliteral &&
-		 ((strlen(cmdbuf) + clientoutlen + 3) > sasl_cmd->maxlen)) {
-	    /* initial response is too long for auth command,
-	       so wait for a server challenge before sending it */
-	    goto noinitresp;
-	}
-	else { /* full response -- encoded below */
-	    prot_printf(pout, " ");
-	}
+    if (!clientout) goto noinitresp;  /* no initial response */
+
+    /* initial response */
+    if (!clientoutlen) { /* zero-length initial response */
+	prot_printf(pout, " =");
+
+	clientout = NULL;
+    }
+    else if (!sendliteral &&
+	     ((strlen(cmdbuf) + clientoutlen + 3) > sasl_cmd->maxlen)) {
+	/* initial response is too long for auth command,
+	   so wait for a server challenge before sending it */
+	goto noinitresp;
+    }
+    else { /* full response -- encoded below */
+	prot_printf(pout, " ");
     }
 
     do {




More information about the Pkg-Cyrus-imapd-Debian-devel mailing list