From d85b09627498574495d8174c744c8171f6e9b3b4 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 8 Nov 2017 16:01:11 +0200 Subject: [PATCH] doveadm: client - Cleanup: Rename handshaked to authenticate_sent This better describes what it does. --- src/doveadm/server-connection.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doveadm/server-connection.c b/src/doveadm/server-connection.c index 48fc44e456..a8ba153fe6 100644 --- a/src/doveadm/server-connection.c +++ b/src/doveadm/server-connection.c @@ -60,7 +60,7 @@ struct server_connection { enum server_reply_state state; - bool handshaked:1; + bool authenticate_sent:1; bool authenticated:1; bool streaming:1; }; @@ -344,7 +344,7 @@ static void server_connection_input(struct server_connection *conn) 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", @@ -363,11 +363,11 @@ static void server_connection_input(struct server_connection *conn) 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); @@ -379,7 +379,7 @@ static void server_connection_input(struct server_connection *conn) server_connection_destroy(&conn); return; } - conn->handshaked = TRUE; + conn->authenticate_sent = TRUE; } if (line == NULL) {