diff options
Diffstat (limited to 'src/channels.c')
| -rw-r--r-- | src/channels.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/channels.c b/src/channels.c index 8c078392..c3d847ab 100644 --- a/src/channels.c +++ b/src/channels.c @@ -390,10 +390,8 @@ static ssh_channel channel_from_msg(ssh_session session, ssh_buffer packet) { uint32_t chan; #ifdef WITH_SSH1 /* With SSH1, the channel is always the first one */ - if(session->version==1) { - struct ssh_iterator *it = ssh_list_get_iterator(session->channels); - return ssh_iterator_value(ssh_channel, it); - } + if(session->version==1) + return ssh_get_channel1(session); #endif if (buffer_get_u32(packet, &chan) != sizeof(uint32_t)) { ssh_set_error(session, SSH_FATAL, |
