www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Patch - keepalive packet

Patch - keepalive packet

From: Ji evk <jsevcik14_at_gmail.com>
Date: Thu, 28 Nov 2013 11:40:21 +0100

Hello againg!
After various problems with sending and receiving keepalive in nonblocking
state(typically: - send keepalive to server through
 libssh2_keepalive_send() function and server reply OR server send
keepalive.In both cases, the event is triggered (through epoll()) and we
must handle this event.) we've created another patch that added
libssh2_check_keepalive(LIBSSH2_SESSION * session) function and adds new
parameter to LIBSSH_SESSION - keepalive_count for storing count of received
keepalives.
Problem occurs when session receives keepalive reply. This packet is
decoded as SSH_MSG_REQUEST_FAILURE but in packet type switch in packet.c
file isn't handled as this type. to resolve this, we've added new case to
handle this packet which deletes and set packAdd_state to
libssh2_NB_state_idle.
I'm not sure if this last change may affect next session state. My question
is the same, as in my previous query with datacount patch, is this patch
correct and applicable?

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2013-11-28

the libssh2 team