dovecot-2.0: auth: VERSION should have been sent before MECH, no...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 8 00:55:17 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/9e28fcdc74ab
changeset: 9982:9e28fcdc74ab
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 07 17:44:01 2009 -0400
description:
auth: VERSION should have been sent before MECH, not after.

diffstat:

1 file changed, 3 insertions(+), 8 deletions(-)
src/auth/auth-client-connection.c |   11 +++--------

diffs (32 lines):

diff -r 1aff70cee4d9 -r 9e28fcdc74ab src/auth/auth-client-connection.c
--- a/src/auth/auth-client-connection.c	Wed Oct 07 15:45:55 2009 -0400
+++ b/src/auth/auth-client-connection.c	Wed Oct 07 17:44:01 2009 -0400
@@ -268,7 +268,6 @@ auth_client_connection_create(struct aut
 {
 	static unsigned int connect_uid_counter = 0;
 	struct auth_client_connection *conn;
-	struct const_iovec iov[2];
 	string_t *str;
 
 	conn = i_new(struct auth_client_connection, 1);
@@ -286,17 +285,13 @@ auth_client_connection_create(struct aut
 	array_append(&auth_client_connections, &conn, 1);
 
 	str = t_str_new(128);
-	str_printfa(str, "VERSION\t%u\t%u\nSPID\t%s\nCUID\t%u\nDONE\n",
+	str_printfa(str, "VERSION\t%u\t%u\n%sSPID\t%s\nCUID\t%u\nDONE\n",
                     AUTH_CLIENT_PROTOCOL_MAJOR_VERSION,
                     AUTH_CLIENT_PROTOCOL_MINOR_VERSION,
+		    str_c(conn->auth->mech_handshake),
 		    my_pid, conn->connect_uid);
 
-	iov[0].iov_base = str_data(conn->auth->mech_handshake);
-	iov[0].iov_len = str_len(conn->auth->mech_handshake);
-	iov[1].iov_base = str_data(str);
-	iov[1].iov_len = str_len(str);
-
-	if (o_stream_sendv(conn->output, iov, 2) < 0)
+	if (o_stream_send(conn->output, str_data(str), str_len(str)) < 0)
 		auth_client_connection_destroy(&conn);
 
 	return conn;


More information about the dovecot-cvs mailing list