diff options
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/session.c b/src/session.c index 1e81edc4..174d4613 100644 --- a/src/session.c +++ b/src/session.c @@ -527,9 +527,10 @@ int ssh_handle_packets_termination(ssh_session session, int timeout, * * @param session The ssh session to use. * - * @returns A bitmask including SSH_CLOSED, SSH_READ_PENDING or SSH_CLOSED_ERROR - * which respectively means the session is closed, has data to read on - * the connection socket and session was closed due to an error. + * @returns A bitmask including SSH_CLOSED, SSH_READ_PENDING, SSH_WRITE_PENDING + * or SSH_CLOSED_ERROR which respectively means the session is closed, + * has data to read on the connection socket and session was closed + * due to an error. */ int ssh_get_status(ssh_session session) { int socketstate; @@ -547,6 +548,9 @@ int ssh_get_status(ssh_session session) { if (socketstate & SSH_READ_PENDING) { r |= SSH_READ_PENDING; } + if (socketstate & SSH_WRITE_PENDING) { + r |= SSH_WRITE_PENDING; + } if (session->closed && (socketstate & SSH_CLOSED_ERROR)) { r |= SSH_CLOSED_ERROR; } |