mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
socket: Fixed ssh_socket_poll().
If we don't have date to read or write, leave ssh_socket_poll().
This commit is contained in:
@@ -484,9 +484,14 @@ int ssh_socket_poll(struct socket *s, int *writeable, int *except) {
|
|||||||
|
|
||||||
if (!s->data_to_read) {
|
if (!s->data_to_read) {
|
||||||
fd->events |= POLLIN;
|
fd->events |= POLLIN;
|
||||||
}
|
} else if (!s->data_to_write) {
|
||||||
if (!s->data_to_write) {
|
|
||||||
fd->events |= POLLOUT;
|
fd->events |= POLLOUT;
|
||||||
|
} else {
|
||||||
|
*except = 1;
|
||||||
|
*writeable = 0;
|
||||||
|
|
||||||
|
leave_function();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the call, and listen for errors */
|
/* Make the call, and listen for errors */
|
||||||
|
|||||||
Reference in New Issue
Block a user