Changeset 5911
- Timestamp:
- Nov 21, 2018 10:08:04 AM (6 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r5892 r5911 312 312 313 313 pj_bool_t is_restarting; 314 pj_status_t restart_status; 314 315 } pjsua_transport_data; 315 316 -
pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
r5833 r5911 1149 1149 pj_status_t status; 1150 1150 char addr[PJ_INET6_ADDRSTRLEN+10]; 1151 int i; 1151 1152 1152 1153 PJ_ASSERT_RETURN(transport != NULL, PJ_EINVAL); … … 1236 1237 } 1237 1238 1239 /* Re-init op_key. */ 1240 for (i = 0; i < tp->rdata_cnt; ++i) { 1241 pj_ioqueue_op_key_init(&tp->rdata[i]->tp_info.op_key.op_key, 1242 sizeof(pj_ioqueue_op_key_t)); 1243 } 1244 1238 1245 /* Restart async read operation. */ 1239 1246 status = start_async_read(tp); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5909 r5911 3566 3566 continue; 3567 3567 3568 if (acc->regc) { 3568 if (acc->regc) { 3569 int j = 0; 3570 pj_status_t found_restart_tp_fail = PJ_FALSE; 3571 3569 3572 pjsip_regc_get_info(acc->regc, ®c_info); 3573 3574 /* Check if transport restart listener succeed. */ 3575 for (; j < PJ_ARRAY_SIZE(pjsua_var.tpdata); ++j) { 3576 if (pjsua_var.tpdata[j].data.ptr != NULL && 3577 pjsua_var.tpdata[j].restart_status != PJ_SUCCESS && 3578 pjsua_var.tpdata[j].type == regc_info.transport->key.type) 3579 { 3580 if ((pjsua_var.tpdata[j].data.factory 3581 == regc_info.transport->factory) || 3582 (pjsua_var.tpdata[j].data.tp 3583 == regc_info.transport)) 3584 { 3585 found_restart_tp_fail = PJ_TRUE; 3586 break; 3587 } 3588 } 3589 } 3590 3591 if (found_restart_tp_fail) { 3592 if (acc->ka_timer.id) { 3593 pjsip_endpt_cancel_timer(pjsua_var.endpt, &acc->ka_timer); 3594 acc->ka_timer.id = PJ_FALSE; 3595 3596 if (acc->ka_transport) { 3597 pjsip_transport_dec_ref(acc->ka_transport); 3598 acc->ka_transport = NULL; 3599 } 3600 } 3601 3602 continue; 3603 } 3604 3570 3605 if ((regc_info.transport) && 3571 3606 ((regc_info.transport->flag & PJSIP_TRANSPORT_DATAGRAM) == 0)) … … 3730 3765 pj_bool_t all_done = PJ_TRUE; 3731 3766 3732 pjsua_var.tpdata[id].is_restarting = PJ_FALSE; 3767 pjsua_var.tpdata[id].is_restarting = PJ_FALSE; 3768 pjsua_var.tpdata[id].restart_status = status; 3733 3769 if (pjsua_var.ua_cfg.cb.on_ip_change_progress) { 3734 3770 pjsua_ip_change_op_info info; … … 3782 3818 if (pjsua_var.tpdata[i].data.ptr != NULL) { 3783 3819 pjsua_var.tpdata[i].is_restarting = PJ_TRUE; 3820 pjsua_var.tpdata[i].restart_status = PJ_EUNKNOWN; 3784 3821 } 3785 3822 } … … 3791 3828 PJSUA_UNLOCK(); 3792 3829 } else { 3830 for (i = 0; i < PJ_ARRAY_SIZE(pjsua_var.tpdata); ++i) { 3831 if (pjsua_var.tpdata[i].data.ptr != NULL) { 3832 pjsua_var.tpdata[i].restart_status = PJ_SUCCESS; 3833 } 3834 } 3793 3835 status = handle_ip_change_on_acc(); 3794 3836 }
Note: See TracChangeset
for help on using the changeset viewer.