Changeset 4259
- Timestamp:
- Sep 18, 2012 9:35:54 AM (12 years ago)
- Location:
- pjproject/trunk/pjsip/src/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r4258 r4259 102 102 /* Keep-alive timer. */ 103 103 pj_timer_entry ka_timer; 104 pj_timer_entry connect_timer; 104 105 pj_time_val last_activity; 105 106 pjsip_tx_data_op_key ka_op_key; … … 524 525 525 526 /* Callback when connect completes */ 527 static pj_bool_t on_connect_complete_real(pj_activesock_t *asock, 528 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 526 538 static pj_bool_t on_connect_complete(pj_activesock_t *asock, 527 pj_status_t status); 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 } 528 557 529 558 /* TCP keep-alive timer callback */ … … 671 700 PJ_TIME_VAL_GT(now, pending_tx->timeout)) 672 701 { 673 on_data_sent(tcp->asock, op_key, -PJ_ETIMEDOUT);674 702 continue; 675 703 } … … 1286 1314 * Callback from ioqueue when asynchronous connect() operation completes. 1287 1315 */ 1288 static pj_bool_t on_connect_complete (pj_activesock_t *asock,1316 static pj_bool_t on_connect_complete_real(pj_activesock_t *asock, 1289 1317 pj_status_t status) 1290 1318 { -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c
r4258 r4259 669 669 PJ_TIME_VAL_GT(now, pending_tx->timeout)) 670 670 { 671 on_data_sent(tls->ssock, op_key, -PJ_ETIMEDOUT);672 671 continue; 673 672 }
Note: See TracChangeset
for help on using the changeset viewer.