1
0
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:
Aris Adamantiadis
2013-11-03 12:46:27 +01:00
committed by Andreas Schneider
parent 754152aa22
commit 04cb94a2dd
2 changed files with 8 additions and 4 deletions

View File

@@ -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;
}