Skip to content

Commit

Permalink
doveadm: client - Cleanup: Rename handshaked to authenticate_sent
Browse files Browse the repository at this point in the history
This better describes what it does.
  • Loading branch information
sirainen authored and Timo Sirainen committed Nov 9, 2017
1 parent 93b8808 commit d85b096
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/doveadm/server-connection.c
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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",
Expand All @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit d85b096

Please sign in to comment.