mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
channels: Make exit_status and uint32_t
This is what we get in the packet and is defined in RFC4254. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -122,7 +122,7 @@ ssh_channel ssh_channel_new(ssh_session session)
|
||||
}
|
||||
|
||||
channel->session = session;
|
||||
channel->exit_status = -1;
|
||||
channel->exit_status = (uint32_t)-1;
|
||||
channel->flags = SSH_CHANNEL_FLAG_NOT_BOUND;
|
||||
|
||||
if (session->channels == NULL) {
|
||||
@@ -3360,7 +3360,7 @@ 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 ||
|
||||
if (channel->exit_status != (uint32_t)-1 ||
|
||||
/* When a channel is closed, no exit status message can
|
||||
* come anymore */
|
||||
(channel->flags & SSH_CHANNEL_FLAG_CLOSED_REMOTE) ||
|
||||
|
||||
Reference in New Issue
Block a user