--- gvpe/src/vpn_tcp.C 2007/12/02 00:45:42 1.22 +++ gvpe/src/vpn_tcp.C 2007/12/06 00:35:29 1.24 @@ -61,11 +61,11 @@ struct tcp_si_map : public map { - void cleaner_cb (ev::timer &w, int revents); ev::timer cleaner; + inline void cleaner_cb (ev::timer &w, int revents); ev::timer cleaner; tcp_si_map () - : cleaner(this, &tcp_si_map::cleaner_cb) { + cleaner.set (this); cleaner.start (::conf.keepalive / 2, ::conf.keepalive / 2); } @@ -91,7 +91,7 @@ int proxy_req_len; #endif - void tcpv4_ev (ev::io &w, int revents); + inline void tcpv4_ev (ev::io &w, int revents); bool send_packet (vpn_packet *pkt, int tos); bool write_packet (); @@ -461,8 +461,10 @@ } tcp_connection::tcp_connection (int fd_, const sockinfo &si_, vpn &v_) -: v(v_), si(si_), ev::io(this, &tcp_connection::tcpv4_ev) +: v(v_), si(si_) { + set (this); + last_activity = ev_now (); r_pkt = 0; w_pkt = 0;