[dovecot-cvs] dovecot/src/auth auth-client-connection.c,1.16,1.17

cras at dovecot.org cras at dovecot.org
Tue Oct 19 02:03:57 EEST 2004


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv14747/auth

Modified Files:
	auth-client-connection.c 
Log Message:
Use reason=xx field in FAIL to report the error message instead of separate
field.



Index: auth-client-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-client-connection.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- auth-client-connection.c	18 Oct 2004 19:21:40 -0000	1.16
+++ auth-client-connection.c	18 Oct 2004 23:03:55 -0000	1.17
@@ -80,9 +80,7 @@
 		break;
 	case AUTH_CLIENT_RESULT_FAILURE:
 		str = t_str_new(128);
-		str_printfa(str, "FAIL\t%u\t", request->id);
-		if (reply != NULL)
-			str_append(str, reply);
+		str_printfa(str, "FAIL\t%u", request->id);
 		if (request->user != NULL)
 			str_printfa(str, "\tuser=%s", request->user);
 		if (request->extra_fields) {
@@ -272,7 +270,8 @@
 			}
 			auth_request_destroy(request);
 			auth_client_send(conn, "FAIL\t%u\t"
-				"Invalid base64 data in initial response", id);
+				"reason=Invalid base64 data in initial "
+				"response", id);
 			return TRUE;
 		}
 		initial_resp_data = buf->data;
@@ -308,12 +307,13 @@
 	request = hash_lookup(conn->auth_requests, POINTER_CAST(id));
 	if (request == NULL) {
 		/* timeouted */
-		auth_client_send(conn, "FAIL\t%u\tTimeouted", id);
+		auth_client_send(conn, "FAIL\t%u\treason=Timeouted", id);
 		return TRUE;
 	}
 
 	if (!request->accept_input) {
-		auth_client_send(conn, "FAIL\t%u\tUnexpected continuation", id);
+		auth_client_send(conn, "FAIL\t%u"
+				 "\treason=Unexpected continuation", id);
 		auth_request_destroy(request);
 		return TRUE;
 	}
@@ -328,8 +328,8 @@
 			       "continued response", request->mech->mech_name,
 			       get_log_prefix(request));
 		}
-		auth_client_send(conn, "FAIL\t%u\tInvalid base64 data in "
-				 "continued response", id);
+		auth_client_send(conn, "FAIL\t%u\treason=Invalid base64 data "
+				 "in continued response", id);
 		auth_request_destroy(request);
 		return TRUE;
 	}



More information about the dovecot-cvs mailing list