comparison svr-session.c @ 939:a0819ecfee0b

Make -K keepalive behave like OpenSSH's ServerAliveInterval
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 Jul 2014 00:15:20 +0800
parents 7cd89d4e0335
children e9dfb6d15193
comparison
equal deleted inserted replaced
938:c88dce72f6d2 939:a0819ecfee0b
93 #endif 93 #endif
94 svr_authinitialise(); 94 svr_authinitialise();
95 chaninitialise(svr_chantypes); 95 chaninitialise(svr_chantypes);
96 svr_chansessinitialise(); 96 svr_chansessinitialise();
97 97
98 ses.connect_time = monotonic_now();
99
100 /* for logging the remote address */ 98 /* for logging the remote address */
101 get_socket_address(ses.sock_in, NULL, NULL, &host, &port, 0); 99 get_socket_address(ses.sock_in, NULL, NULL, &host, &port, 0);
102 len = strlen(host) + strlen(port) + 2; 100 len = strlen(host) + strlen(port) + 2;
103 svr_ses.addrstring = m_malloc(len); 101 svr_ses.addrstring = m_malloc(len);
104 snprintf(svr_ses.addrstring, len, "%s:%s", host, port); 102 snprintf(svr_ses.addrstring, len, "%s:%s", host, port);