mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
Correctly handle failed opened channels
This commit is contained in:
@@ -165,8 +165,10 @@ static int channel_open(ssh_channel channel, const char *type_c, int window,
|
|||||||
type_c, channel->local_channel);
|
type_c, channel->local_channel);
|
||||||
|
|
||||||
if (packet_wait(session, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, 1) != SSH_OK) {
|
if (packet_wait(session, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, 1) != SSH_OK) {
|
||||||
leave_function();
|
if(session->in_packet.type != SSH2_MSG_CHANNEL_OPEN_FAILURE) {
|
||||||
return -1;
|
leave_function();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(session->in_packet.type) {
|
switch(session->in_packet.type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user