Changeset 5090 for pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
- Timestamp:
- May 11, 2015 5:57:50 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r5000 r5090 1141 1141 } 1142 1142 /* Start keep-alive timer */ 1143 if ( PJSIP_TCP_KEEP_ALIVE_INTERVAL) {1144 pj_time_val delay = { PJSIP_TCP_KEEP_ALIVE_INTERVAL, 0};1143 if (pjsip_cfg()->tcp.keep_alive_interval) { 1144 pj_time_val delay = {pjsip_cfg()->tcp.keep_alive_interval, 0}; 1145 1145 pjsip_endpt_schedule_timer(listener->endpt, 1146 1146 &tcp->ka_timer, … … 1500 1500 1501 1501 /* Start keep-alive timer */ 1502 if ( PJSIP_TCP_KEEP_ALIVE_INTERVAL) {1503 pj_time_val delay = { PJSIP_TCP_KEEP_ALIVE_INTERVAL, 0 };1502 if (pjsip_cfg()->tcp.keep_alive_interval) { 1503 pj_time_val delay = { pjsip_cfg()->tcp.keep_alive_interval, 0 }; 1504 1504 pjsip_endpt_schedule_timer(tcp->base.endpt, &tcp->ka_timer, 1505 1505 &delay); … … 1527 1527 PJ_TIME_VAL_SUB(now, tcp->last_activity); 1528 1528 1529 if (now.sec > 0 && now.sec < PJSIP_TCP_KEEP_ALIVE_INTERVAL) {1529 if (now.sec > 0 && now.sec < pjsip_cfg()->tcp.keep_alive_interval) { 1530 1530 /* There has been activity, so don't send keep-alive */ 1531 delay.sec = PJSIP_TCP_KEEP_ALIVE_INTERVAL- now.sec;1531 delay.sec = pjsip_cfg()->tcp.keep_alive_interval - now.sec; 1532 1532 delay.msec = 0; 1533 1533 … … 1556 1556 1557 1557 /* Register next keep-alive */ 1558 delay.sec = PJSIP_TCP_KEEP_ALIVE_INTERVAL;1558 delay.sec = pjsip_cfg()->tcp.keep_alive_interval; 1559 1559 delay.msec = 0; 1560 1560
Note: See TracChangeset
for help on using the changeset viewer.