mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-02 01:17:52 +03:00
socket: Fix check for pending data.
BUG: https://red.libssh.org/issues/119 Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
754152aa22
commit
04cb94a2dd
@@ -695,11 +695,11 @@ int ssh_socket_buffered_write_bytes(ssh_socket s){
|
||||
int ssh_socket_get_status(ssh_socket s) {
|
||||
int r = 0;
|
||||
|
||||
if (s->read_wontblock) {
|
||||
r |= SSH_READ_PENDING;
|
||||
if (buffer_get_len(s->in_buffer) > 0) {
|
||||
r |= SSH_READ_PENDING;
|
||||
}
|
||||
|
||||
if (s->write_wontblock) {
|
||||
if (buffer_get_len(s->out_buffer) > 0) {
|
||||
r |= SSH_WRITE_PENDING;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user