found the nasty server bug ("ssh_accept: ")

it was the session->alive which was null. I wonder how this bug survived 
my initial development ...


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@115 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Aris Adamantiadis
2007-03-17 22:35:59 +00:00
parent 7b6c7fac53
commit 0c3ead7392
2 changed files with 3 additions and 1 deletions

View File

@@ -642,7 +642,8 @@ static int packet_wait2(SSH_SESSION *session,int type,int blocking){
switch(session->in_packet.type){
case SSH2_MSG_DISCONNECT:
packet_parse(session);
return SSH_ERROR;
ssh_say(2,"received disconnect packet\n");
return SSH_ERROR;
case SSH2_MSG_CHANNEL_WINDOW_ADJUST:
case SSH2_MSG_CHANNEL_DATA:
case SSH2_MSG_CHANNEL_EXTENDED_DATA:

View File

@@ -264,6 +264,7 @@ static int dh_handshake_server(SSH_SESSION *session){
int ssh_accept(SSH_SESSION *session){
ssh_send_banner(session,1);
ssh_crypto_init();
session->alive=1;
session->clientbanner=ssh_get_banner(session);
server_set_kex(session);
ssh_send_kex(session,1);