mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09: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>
(cherry picked from commit 2f1f662d46)
This commit is contained in:
committed by
Andreas Schneider
parent
0408d8d851
commit
8837d32d92
@@ -121,6 +121,10 @@ ssh_channel ssh_channel_new(ssh_session session)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user