changeset 22750:954aab30f28e

doveadm: client - Cleanup: Rename handshaked to authenticate_sent This better describes what it does.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 08 Nov 2017 16:01:11 +0200
parents 7c10968dc541
children 482337bf6a60
files src/doveadm/server-connection.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/server-connection.c	Wed Nov 08 14:06:00 2017 +0200
+++ b/src/doveadm/server-connection.c	Wed Nov 08 16:01:11 2017 +0200
@@ -60,7 +60,7 @@
 
 	enum server_reply_state state;
 
-	unsigned int handshaked:1;
+	unsigned int authenticate_sent:1;
 	unsigned int authenticated:1;
 	unsigned int streaming:1;
 };
@@ -333,7 +333,7 @@
 	if (conn->to_input != NULL)
 		timeout_remove(&conn->to_input);
 
-	if (!conn->handshaked || !conn->authenticated) {
+	if (!conn->authenticate_sent || !conn->authenticated) {
 		while((line = i_stream_read_next_line(conn->input)) != NULL) {
 			if (strncmp(line, "VERSION\t", 8) == 0) {
 				if (!version_string_verify_full(line, "doveadm-client",
@@ -352,11 +352,11 @@
 				server_connection_authenticated(conn);
 				break;
 			} else if (strcmp(line, "-") == 0) {
-				if (!conn->handshaked &&
+				if (!conn->authenticate_sent &&
 				    server_connection_authenticate(conn) < 0) {
 					server_connection_destroy(&conn);
 					return;
-				} else if (conn->handshaked) {
+				} else if (conn->authenticate_sent) {
 					i_error("doveadm authentication failed (%s)",
 						line+1);
 					server_connection_destroy(&conn);
@@ -368,7 +368,7 @@
 				server_connection_destroy(&conn);
 				return;
 			}
-			conn->handshaked = TRUE;
+			conn->authenticate_sent = TRUE;
 		}
 
 		if (line == NULL) {