Commit 90cb578e authored by Niels Möller's avatar Niels Möller
Browse files

* src/client.c: Refer to the static packet handlers instead of

connection->fail and friends.
* src/client_userauth.c: Likewise
* src/client_keyexchange.c: Likewise.

Rev: src/client.c:1.98
Rev: src/client_keyexchange.c:1.53
Rev: src/client_userauth.c:1.41
parent 7db4451a
...@@ -92,7 +92,7 @@ do_accept_service(struct packet_handler *c, ...@@ -92,7 +92,7 @@ do_accept_service(struct packet_handler *c,
&& parse_eod(&buffer)) && parse_eod(&buffer))
{ {
lsh_string_free(packet); lsh_string_free(packet);
connection->dispatch[SSH_MSG_SERVICE_ACCEPT] = connection->fail; connection->dispatch[SSH_MSG_SERVICE_ACCEPT] = &connection_fail_handler;
COMMAND_RETURN(closure->c, connection); COMMAND_RETURN(closure->c, connection);
} }
......
...@@ -117,7 +117,7 @@ do_handle_dh_reply(struct packet_handler *c, ...@@ -117,7 +117,7 @@ do_handle_dh_reply(struct packet_handler *c,
/* Key exchange successful! */ /* Key exchange successful! */
connection->dispatch[SSH_MSG_KEXDH_REPLY] = connection->fail; connection->dispatch[SSH_MSG_KEXDH_REPLY] = &connection_fail_handler;
keyexchange_finish(connection, closure->algorithms, keyexchange_finish(connection, closure->algorithms,
closure->dh.method->H, closure->dh.method->H,
...@@ -204,7 +204,7 @@ do_srp_client_proof_handler(struct packet_handler *s, ...@@ -204,7 +204,7 @@ do_srp_client_proof_handler(struct packet_handler *s,
packet); packet);
lsh_string_free(packet); lsh_string_free(packet);
connection->dispatch[SSH_MSG_KEXSRP_PROOF] = connection->fail; connection->dispatch[SSH_MSG_KEXSRP_PROOF] = &connection_fail_handler;
if (res) if (res)
{ {
...@@ -251,7 +251,7 @@ do_handle_srp_reply(struct packet_handler *s, ...@@ -251,7 +251,7 @@ do_handle_srp_reply(struct packet_handler *s,
mpz_t x; mpz_t x;
connection->dispatch[SSH_MSG_KEXSRP_REPLY] = connection->fail; connection->dispatch[SSH_MSG_KEXSRP_REPLY] = &connection_fail_handler;
if (!salt) if (!salt)
{ {
......
...@@ -207,7 +207,7 @@ do_userauth_success(struct packet_handler *c, ...@@ -207,7 +207,7 @@ do_userauth_success(struct packet_handler *c,
werror("User authentication successful.\n"); werror("User authentication successful.\n");
for (i = SSH_FIRST_USERAUTH_GENERIC; i < SSH_FIRST_CONNECTION_GENERIC; i++) for (i = SSH_FIRST_USERAUTH_GENERIC; i < SSH_FIRST_CONNECTION_GENERIC; i++)
connection->dispatch[i] = connection->fail; connection->dispatch[i] = &connection_fail_handler;
COMMAND_RETURN(self->c, connection); COMMAND_RETURN(self->c, connection);
} }
...@@ -695,7 +695,7 @@ client_publickey_next(struct client_publickey_state *state) ...@@ -695,7 +695,7 @@ client_publickey_next(struct client_publickey_state *state)
/* We have got a response on the final query request. */ /* We have got a response on the final query request. */
state->connection->dispatch[SSH_MSG_USERAUTH_PK_OK] state->connection->dispatch[SSH_MSG_USERAUTH_PK_OK]
= state->connection->fail; = &connection_fail_handler;
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment