mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-08 03:42:12 +03:00
channels: Reformat ssh_channel_exit_status_termination()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -3359,14 +3359,15 @@ ssh_session ssh_channel_get_session(ssh_channel channel)
|
||||
|
||||
static int ssh_channel_exit_status_termination(void *c)
|
||||
{
|
||||
ssh_channel channel = c;
|
||||
if(channel->exit_status != -1 ||
|
||||
/* When a channel is closed, no exit status message can
|
||||
* come anymore */
|
||||
(channel->flags & SSH_CHANNEL_FLAG_CLOSED_REMOTE) ||
|
||||
channel->session->session_state == SSH_SESSION_STATE_ERROR)
|
||||
return 1;
|
||||
else
|
||||
ssh_channel channel = c;
|
||||
if (channel->exit_status != -1 ||
|
||||
/* When a channel is closed, no exit status message can
|
||||
* come anymore */
|
||||
(channel->flags & SSH_CHANNEL_FLAG_CLOSED_REMOTE) ||
|
||||
channel->session->session_state == SSH_SESSION_STATE_ERROR)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user