diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2008-10-29 00:25:31 +0000 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2008-10-29 00:25:31 +0000 |
commit | 3b25cbf13406cb2f775a8298d2224b187de16275 (patch) | |
tree | bcc58a530ec6299b225a54d17558f300ee928f75 /libssh/session.c | |
parent | 4a3554b2fa794edec0a628610e7bfb3749d76129 (diff) | |
download | libssh-3b25cbf13406cb2f775a8298d2224b187de16275.tar.gz libssh-3b25cbf13406cb2f775a8298d2224b187de16275.tar.xz libssh-3b25cbf13406cb2f775a8298d2224b187de16275.zip |
fixed a bug where channel_poll could wait forever for a packet already in socket buffer.
Inc'ed libtool numbers
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@184 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/session.c')
-rw-r--r-- | libssh/session.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libssh/session.c b/libssh/session.c index 264855b..dc485ec 100644 --- a/libssh/session.c +++ b/libssh/session.c @@ -92,7 +92,7 @@ void ssh_cleanup(SSH_SESSION *session){ ssh_message_free(session->ssh_message); free(session->ssh_message); } - memset(session,'X',sizeof(SSH_SESSION)); /* burn connection, it could hangs + memset(session,'X',sizeof(SSH_SESSION)); /* burn connection, it could hangs sensitive datas */ free(session); //leave_function(); @@ -129,8 +129,8 @@ void ssh_set_blocking(SSH_SESSION *session,int blocking){ session->blocking=blocking?1:0; } -/** In case you'd need the file descriptor of the connection - * to the server/client +/** In case you'd need the file descriptor of the connection + * to the server/client * \brief recover the fd of connection * \param session ssh session * \return file descriptor of the connection, or -1 if it is @@ -153,7 +153,7 @@ void ssh_set_fd_toread(SSH_SESSION *session){ */ void ssh_set_fd_towrite(SSH_SESSION *session){ ssh_socket_set_towrite(session->socket); - + } /** \brief say the session it has an exception to catch on the file descriptor @@ -170,7 +170,7 @@ int ssh_handle_packets(SSH_SESSION *session){ int w,err,r,i=0; enter_function(); do { - r=ssh_fd_poll(session,&w,&err); + r=ssh_socket_poll(session->socket,&w,&err); if(r<=0){ leave_function(); return r; // error or no data available |