mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
channels: Fix an endless loop in case of a channel_open error.
This commit is contained in:
committed by
Andreas Schneider
parent
af85337f5f
commit
7ccd9c31b3
@@ -297,6 +297,10 @@ static int channel_open(ssh_channel channel, const char *type_c, int window,
|
||||
/* wait until channel is opened by server */
|
||||
while(channel->state == SSH_CHANNEL_STATE_NOT_OPEN){
|
||||
ssh_handle_packets(session, -2);
|
||||
if (session->session_state == SSH_SESSION_STATE_ERROR) {
|
||||
err = SSH_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(channel->state == SSH_CHANNEL_STATE_OPEN)
|
||||
err=SSH_OK;
|
||||
|
||||
Reference in New Issue
Block a user