1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

channels: Initialize states explicitly

In ssh_channel_new(), initialize channel->state and
channel->request_state explicitly for better readability.

Fixes T194

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-11-05 14:14:16 +01:00
committed by Andreas Schneider
parent 7e3995d2dd
commit 2f1f662d46

View File

@@ -121,6 +121,10 @@ ssh_channel ssh_channel_new(ssh_session session)
ssh_list_prepend(session->channels, channel); ssh_list_prepend(session->channels, channel);
/* Set states explicitly */
channel->state = SSH_CHANNEL_STATE_NOT_OPEN;
channel->request_state = SSH_CHANNEL_REQ_STATE_NONE;
return channel; return channel;
} }