Skip to content

Commit

Permalink
doveadm: client - Cleanup: Don't check authenticate_sent twice
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and Timo Sirainen committed Nov 15, 2017
1 parent b52b16e commit fd91d0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/doveadm/server-connection.c
Expand Up @@ -376,16 +376,16 @@ static void server_connection_input(struct server_connection *conn)
server_connection_authenticated(conn);
break;
} else if (strcmp(line, "-") == 0) {
if (!conn->authenticate_sent &&
server_connection_authenticate(conn) < 0) {
server_connection_destroy(&conn);
return;
} else if (conn->authenticate_sent) {
if (conn->authenticate_sent) {
i_error("doveadm authentication failed (%s)",
line+1);
server_connection_destroy(&conn);
return;
}
if (server_connection_authenticate(conn) < 0) {
server_connection_destroy(&conn);
return;
}
} else {
i_error("doveadm server sent invalid handshake: %s",
line);
Expand Down

0 comments on commit fd91d0e

Please sign in to comment.