Commit 74aacd67 authored by Niels Möller's avatar Niels Möller
Browse files

(do_exit_status, do_exit_signal): Use

SSH_CONNECTION_ERROR.

Rev: src/client.c:1.166.2.8
parent 1081f84a
......@@ -185,14 +185,14 @@ make_detach_callback(int *exit_status)
*/
static void
do_exit_status(struct channel_request *c,
do_exit_status(struct channel_request *s,
struct ssh_channel *channel,
struct channel_request_info *info,
struct simple_buffer *args,
struct command_continuation *s,
struct exception_handler *e)
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST(exit_handler, closure, c);
CAST(exit_handler, self, s);
uint32_t status;
if (!info->want_reply
......@@ -202,7 +202,7 @@ do_exit_status(struct channel_request *c,
verbose("client.c: Receiving exit-status %i on channel %i\n",
status, channel->remote_channel_number);
*closure->exit_status = status;
*self->exit_status = status;
ALIST_SET(channel->request_types, ATOM_EXIT_STATUS, NULL);
ALIST_SET(channel->request_types, ATOM_EXIT_SIGNAL, NULL);
......@@ -210,22 +210,22 @@ do_exit_status(struct channel_request *c,
channel->sinks--;
channel_maybe_close(channel);
COMMAND_RETURN(s, channel);
COMMAND_RETURN(c, channel);
}
else
/* Invalid request */
PROTOCOL_ERROR(e, "Invalid exit-status message");
SSH_CONNECTION_ERROR(channel->connection, "Invalid exit-status message");
}
static void
do_exit_signal(struct channel_request *c,
do_exit_signal(struct channel_request *s,
struct ssh_channel *channel,
struct channel_request_info *info,
struct simple_buffer *args,
struct command_continuation *s,
struct exception_handler *e)
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST(exit_handler, closure, c);
CAST(exit_handler, self, s);
uint32_t signal;
int core;
......@@ -246,7 +246,7 @@ do_exit_signal(struct channel_request *c,
/* FIXME: What exit status should be returned when the remote
* process dies violently? */
*closure->exit_status = 7;
*self->exit_status = 7;
werror("Remote process was killed by signal: %ups %z\n",
length, msg,
......@@ -259,11 +259,11 @@ do_exit_signal(struct channel_request *c,
channel->sinks--;
channel_maybe_close(channel);
COMMAND_RETURN(s, channel);
COMMAND_RETURN(c, channel);
}
else
/* Invalid request */
PROTOCOL_ERROR(e, "Invalid exit-signal message");
SSH_CONNECTION_ERROR(channel->connection, "Invalid exit-signal message");
}
struct channel_request *
......
Supports Markdown
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