mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +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:
@@ -80,7 +80,7 @@ struct ssh_channel_struct {
|
||||
ssh_buffer stdout_buffer;
|
||||
ssh_buffer stderr_buffer;
|
||||
void *userarg;
|
||||
int exit_status;
|
||||
uint32_t exit_status;
|
||||
enum ssh_channel_request_state_e request_state;
|
||||
struct ssh_list *callbacks; /* list of ssh_channel_callbacks */
|
||||
|
||||
|
||||
@@ -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