From bcea8921ba279712efc79dc46bbe427bc70d8def Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 10 Jan 2011 17:39:47 +0100 Subject: Change blocking parameter to a flag --- include/libssh/libssh.h | 1 + include/libssh/session.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 77af7897..5a3505cc 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -384,6 +384,7 @@ LIBSSH_API int ssh_get_random(void *where,int len,int strong); LIBSSH_API int ssh_get_version(ssh_session session); LIBSSH_API int ssh_get_status(ssh_session session); LIBSSH_API int ssh_init(void); +LIBSSH_API int ssh_is_blocking(ssh_session session); LIBSSH_API int ssh_is_server_known(ssh_session session); LIBSSH_API void ssh_log(ssh_session session, int prioriry, const char *format, ...) PRINTF_ATTRIBUTE(3, 4); LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg); diff --git a/include/libssh/session.h b/include/libssh/session.h index a2cdfa07..406ba139 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -51,6 +51,10 @@ enum ssh_dh_state_e { DH_STATE_FINISHED }; + +/* libssh calls may block an undefined amount of time */ +#define SSH_SESSION_FLAG_BLOCKING 1 + struct ssh_session_struct { struct error_struct error; struct ssh_socket_struct *socket; @@ -72,8 +76,8 @@ struct ssh_session_struct { /* two previous are deprecated */ /* int auth_service_asked; */ -/* socket status */ - int blocking; /* functions should block */ + /* session flags (SSH_SESSION_FLAG_*) */ + int flags; ssh_string banner; /* that's the issue banner from the server */ -- cgit v1.2.3