Mercurial > dropbear
diff svr-chansession.c @ 970:0bb16232e7c4
Make keepalive handling more robust, this should now match what OpenSSH does
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 19 Aug 2014 23:08:56 +0800 |
parents | 36eacc322e00 |
children | eb5cb4f45cd6 |
line wrap: on
line diff
--- a/svr-chansession.c Wed Aug 13 22:07:43 2014 +0800 +++ b/svr-chansession.c Tue Aug 19 23:08:56 2014 +0800 @@ -53,6 +53,7 @@ static void closechansess(struct Channel *channel); static int newchansess(struct Channel *channel); static void chansessionrequest(struct Channel *channel); +static int sesscheckclose(struct Channel *channel); static void send_exitsignalstatus(struct Channel *channel); static void send_msg_chansess_exitstatus(struct Channel * channel, @@ -61,6 +62,14 @@ struct ChanSess * chansess); static void get_termmodes(struct ChanSess *chansess); +const struct ChanType svrchansess = { + 0, /* sepfds */ + "session", /* name */ + newchansess, /* inithandler */ + sesscheckclose, /* checkclosehandler */ + chansessionrequest, /* reqhandler */ + closechansess, /* closehandler */ +}; /* required to clear environment */ extern char** environ; @@ -968,16 +977,6 @@ dropbear_exit("Child failed"); } -const struct ChanType svrchansess = { - 0, /* sepfds */ - "session", /* name */ - newchansess, /* inithandler */ - sesscheckclose, /* checkclosehandler */ - chansessionrequest, /* reqhandler */ - closechansess, /* closehandler */ -}; - - /* Set up the general chansession environment, in particular child-exit * handling */ void svr_chansessinitialise() {