mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-23 01:22:37 +03:00
session_startup: init state properly
libssh2_session_startup() didn't set the state correctly so it could get confused. Fixes #218
This commit is contained in:
committed by
Daniel Stenberg
parent
26dad4590b
commit
ce8f0b29a4
@@ -676,12 +676,11 @@ session_startup(LIBSSH2_SESSION *session, libssh2_socket_t sock)
|
|||||||
"Failed sending banner");
|
"Failed sending banner");
|
||||||
}
|
}
|
||||||
session->startup_state = libssh2_NB_state_sent;
|
session->startup_state = libssh2_NB_state_sent;
|
||||||
|
session->banner_TxRx_state = libssh2_NB_state_idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->startup_state == libssh2_NB_state_sent) {
|
if (session->startup_state == libssh2_NB_state_sent) {
|
||||||
do {
|
do {
|
||||||
session->banner_TxRx_state = libssh2_NB_state_idle;
|
|
||||||
|
|
||||||
rc = banner_receive(session);
|
rc = banner_receive(session);
|
||||||
if (rc)
|
if (rc)
|
||||||
return _libssh2_error(session, rc,
|
return _libssh2_error(session, rc,
|
||||||
|
|||||||
Reference in New Issue
Block a user