mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 10:40:27 +09:00
channels: Correctly reports failed channels opening
Fixes T75
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
(cherry picked from commit 2f05243a4a)
This commit is contained in:
committed by
Anderson Toshiyuki Sasaki
parent
e6ba98a0aa
commit
93541fe150
@@ -350,8 +350,13 @@ pending:
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
/* This needs to pass the SSH_AGAIN from the above,
|
||||||
|
* but needs to catch failed channel states */
|
||||||
if (channel->state == SSH_CHANNEL_STATE_OPEN) {
|
if (channel->state == SSH_CHANNEL_STATE_OPEN) {
|
||||||
err = SSH_OK;
|
err = SSH_OK;
|
||||||
|
} else if (err != SSH_AGAIN) {
|
||||||
|
/* Messages were handled correctly, but he channel state is invalid */
|
||||||
|
err = SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user