oops, forgot to verify that it compiled fine

also, published changes from Norbert including lots of session->fd checks


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@81 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Aris Adamantiadis
2006-11-12 00:57:48 +00:00
parent 4442e0e262
commit ff273b26b3
6 changed files with 66 additions and 25 deletions

View File

@@ -43,6 +43,7 @@ SSH_SESSION *ssh_new() {
session->next_crypto=crypto_new();
session->maxchannel=FIRST_CHANNEL;
session->fd=-1;
session->alive=0;
session->blocking=1;
return session;
}
@@ -96,8 +97,10 @@ void ssh_cleanup(SSH_SESSION *session){
* \param session current ssh session
*/
void ssh_silent_disconnect(SSH_SESSION *session){
close(session->fd);
if(session->fd>=0)
close(session->fd);
session->alive=0;
session->fd=-1;
ssh_disconnect(session);
}