summaryrefslogtreecommitdiffstats
path: root/libssh/packet.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-06-17 23:53:00 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-06-17 23:53:00 +0200
commitcf482ae3bfb8492d996cfc9e036f5086ff69eed4 (patch)
tree6f9ef588bdcaa8834006efea72d1cbe197a1ff6e /libssh/packet.c
parent916958a2bb4be50f8562719119c143ba74fb803c (diff)
downloadlibssh-cf482ae3bfb8492d996cfc9e036f5086ff69eed4.tar.gz
libssh-cf482ae3bfb8492d996cfc9e036f5086ff69eed4.tar.xz
libssh-cf482ae3bfb8492d996cfc9e036f5086ff69eed4.zip
Begin of asynchronous SSH message parsing
Diffstat (limited to 'libssh/packet.c')
-rw-r--r--libssh/packet.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libssh/packet.c b/libssh/packet.c
index 4feca067..870efd4a 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -594,7 +594,7 @@ int packet_send(SSH_SESSION *session) {
void packet_parse(SSH_SESSION *session) {
STRING *error_s = NULL;
char *error = NULL;
- int type = session->in_packet.type;
+ u32 type = session->in_packet.type;
u32 tmp;
#ifdef HAVE_SSH1
@@ -652,9 +652,15 @@ void packet_parse(SSH_SESSION *session) {
case SSH2_MSG_CHANNEL_EOF:
case SSH2_MSG_CHANNEL_CLOSE:
channel_handle(session,type);
+ return;
case SSH2_MSG_IGNORE:
case SSH2_MSG_DEBUG:
return;
+ case SSH2_MSG_SERVICE_REQUEST:
+ case SSH2_MSG_USERAUTH_REQUEST:
+ case SSH2_MSG_CHANNEL_OPEN:
+ message_handle(session,type);
+ return;
default:
ssh_log(session, SSH_LOG_RARE, "Received unhandled packet %d", type);
}