Commit a3513972 authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

(login_service_command): Use init_connection_service instead of init_login_service.

(init_login_service): Removed redundant function.

Rev: src/channel.c:1.118
parent 15bd2fe4
......@@ -1709,56 +1709,6 @@ DEFINE_COMMAND(connection_service_command)
COMMAND_RETURN(c, connection);
}
/* FIXME: Exactly what is the difference between this function and
init_connection_service. */
void
init_login_service(struct ssh_connection *connection)
{
struct channel_table *table = make_channel_table();
debug("channel.c: do_connection_service\n");
connection->table = table;
/* Cancel handshake timeout */
connection_clear_timeout(connection);
/* Unfreeze channels after key exchange */
connection_after_keyexchange(connection, &channels_after_keyexchange);
connection->dispatch[SSH_MSG_CHANNEL_OPEN]
= &channel_open_handler;
connection->dispatch[SSH_MSG_CHANNEL_REQUEST]
= &channel_request_handler;
connection->dispatch[SSH_MSG_CHANNEL_WINDOW_ADJUST]
= &window_adjust_handler;
connection->dispatch[SSH_MSG_CHANNEL_DATA]
= &channel_data_handler;
connection->dispatch[SSH_MSG_CHANNEL_EXTENDED_DATA]
= &channel_extended_data_handler;
connection->dispatch[SSH_MSG_CHANNEL_EOF]
= &channel_eof_handler;
connection->dispatch[SSH_MSG_CHANNEL_CLOSE]
= &channel_close_handler;
connection->dispatch[SSH_MSG_CHANNEL_OPEN_CONFIRMATION]
= &channel_open_confirm_handler;
connection->dispatch[SSH_MSG_CHANNEL_OPEN_FAILURE]
= &channel_open_failure_handler;
connection->dispatch[SSH_MSG_CHANNEL_SUCCESS]
= &channel_success_handler;
connection->dispatch[SSH_MSG_CHANNEL_FAILURE]
= &channel_failure_handler;
connection->dispatch[SSH_MSG_REQUEST_SUCCESS]
= &global_success_handler;
connection->dispatch[SSH_MSG_REQUEST_FAILURE]
= &global_failure_handler;
}
DEFINE_COMMAND(login_service_command)
(struct command *s UNUSED,
......@@ -1768,7 +1718,7 @@ DEFINE_COMMAND(login_service_command)
{
CAST(ssh_connection, connection, a);
init_login_service(connection);
init_connection_service(connection);
COMMAND_RETURN(c, connection);
}
......
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