Changeset 4260 for pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
- Timestamp:
- Sep 18, 2012 9:38:44 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r4259 r4260 102 102 /* Keep-alive timer. */ 103 103 pj_timer_entry ka_timer; 104 pj_timer_entry connect_timer;105 104 pj_time_val last_activity; 106 105 pjsip_tx_data_op_key ka_op_key; … … 525 524 526 525 /* Callback when connect completes */ 527 static pj_bool_t on_connect_complete _real(pj_activesock_t *asock,526 static pj_bool_t on_connect_complete(pj_activesock_t *asock, 528 527 pj_status_t status); 529 530 static void tcp_connect_timer(pj_timer_heap_t *th, pj_timer_entry *e)531 {532 struct tcp_transport *tcp = (struct tcp_transport*) e->user_data;533 534 e->id = 0;535 on_connect_complete_real(tcp->asock, PJ_SUCCESS);536 }537 538 static pj_bool_t on_connect_complete(pj_activesock_t *asock,539 pj_status_t status)540 {541 struct tcp_transport *tcp;542 pj_time_val delay = {35, 0};543 544 tcp = (struct tcp_transport*) pj_activesock_get_user_data(asock);545 546 if (status != PJ_SUCCESS) {547 return on_connect_complete_real(asock, status);548 }549 550 PJ_LOG(3,(tcp->base.obj_name, "Delaying CONNECT notification"));551 pj_timer_entry_init(&tcp->connect_timer, 1, (void*)tcp, &tcp_connect_timer);552 pjsip_endpt_schedule_timer(tcp->base.endpt, &tcp->connect_timer,553 &delay);554 555 return PJ_TRUE;556 }557 528 558 529 /* TCP keep-alive timer callback */ … … 1314 1285 * Callback from ioqueue when asynchronous connect() operation completes. 1315 1286 */ 1316 static pj_bool_t on_connect_complete _real(pj_activesock_t *asock,1287 static pj_bool_t on_connect_complete(pj_activesock_t *asock, 1317 1288 pj_status_t status) 1318 1289 {
Note: See TracChangeset
for help on using the changeset viewer.