clear socket_block_directions bits before send/recv
These two places are the only places where send and recv are called outside of transport.c so make sure they clear/set the bits correctly.
Этот коммит содержится в:
родитель
e39128df52
Коммит
08be841b4d
@ -106,6 +106,9 @@ banner_receive(LIBSSH2_SESSION * session)
|
|||||||
|| (session->banner_TxRx_banner[banner_len - 1] != '\n'))) {
|
|| (session->banner_TxRx_banner[banner_len - 1] != '\n'))) {
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
|
|
||||||
|
/* no incoming block yet! */
|
||||||
|
session->socket_block_directions &= ~LIBSSH2_SESSION_BLOCK_INBOUND;
|
||||||
|
|
||||||
ret = _libssh2_recv(session->socket_fd, &c, 1,
|
ret = _libssh2_recv(session->socket_fd, &c, 1,
|
||||||
LIBSSH2_SOCKET_RECV_FLAGS(session));
|
LIBSSH2_SOCKET_RECV_FLAGS(session));
|
||||||
|
|
||||||
@ -207,6 +210,9 @@ banner_send(LIBSSH2_SESSION * session)
|
|||||||
session->banner_TxRx_state = libssh2_NB_state_created;
|
session->banner_TxRx_state = libssh2_NB_state_created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* no outgoing block yet! */
|
||||||
|
session->socket_block_directions &= ~LIBSSH2_SESSION_BLOCK_OUTBOUND;
|
||||||
|
|
||||||
ret = _libssh2_send(session->socket_fd,
|
ret = _libssh2_send(session->socket_fd,
|
||||||
banner + session->banner_TxRx_total_send,
|
banner + session->banner_TxRx_total_send,
|
||||||
banner_len - session->banner_TxRx_total_send,
|
banner_len - session->banner_TxRx_total_send,
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user