Changeset 5521
- Timestamp:
- Jan 11, 2017 7:29:46 AM (8 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
r5520 r5521 1837 1837 tp_ice = (struct transport_ice*) pj_ice_strans_get_user_data(ice_st); 1838 1838 1839 pj_perror(5, tp_ice->base.name, result, "ICE operation complete" 1840 " (op=%d%s)", op, 1841 (op==PJ_ICE_STRANS_OP_INIT? "/initialization" : 1842 (op==PJ_ICE_STRANS_OP_NEGOTIATION? "/negotiation":""))); 1843 1839 1844 /* Notify application */ 1840 1845 if (tp_ice->cb.on_ice_complete) -
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r5481 r5521 377 377 cand->status = PJ_EPENDING; 378 378 cand->local_pref = RELAY_PREF; 379 cand->transport_id = CREATE_TP_ID(TP_TURN, idx);379 cand->transport_id = tp_id; 380 380 cand->comp_id = (pj_uint8_t) comp->comp_id; 381 381 } … … 414 414 415 415 PJ_LOG(4,(ice_st->obj_name, 416 "Comp %d: TURN relay candidate waiting for allocation", 417 comp->comp_id)); 416 "Comp %d/%d: TURN relay candidate (tpid=%d) " 417 "waiting for allocation", 418 comp->comp_id, comp->cand_cnt-1, cand->transport_id)); 418 419 419 420 return PJ_SUCCESS; … … 516 517 517 518 PJ_LOG(4,(ice_st->obj_name, 518 "Comp %d: srflx candidate starts Binding discovery", 519 comp->comp_id)); 519 "Comp %d: srflx candidate (tpid=%d) starts " 520 "Binding discovery", 521 comp->comp_id, cand->transport_id)); 520 522 521 523 pj_log_push_indent(); … … 623 625 if (cand_duplicate) { 624 626 PJ_LOG(4, (ice_st->obj_name, 625 "Comp %d: host candidate %s is a duplicate",627 "Comp %d: host candidate %s (tpid=%d) is a duplicate", 626 628 comp->comp_id, pj_sockaddr_print(&cand->addr, addrinfo, 627 sizeof(addrinfo), 3) ));629 sizeof(addrinfo), 3), cand->transport_id)); 628 630 629 631 pj_bzero(&cand->addr, sizeof(cand->addr)); … … 638 640 639 641 PJ_LOG(4,(ice_st->obj_name, 640 "Comp %d: host candidate %s added", 641 comp->comp_id, pj_sockaddr_print(&cand->addr, addrinfo, 642 sizeof(addrinfo), 3))); 642 "Comp %d/%d: host candidate %s (tpid=%d) added", 643 comp->comp_id, comp->cand_cnt-1, 644 pj_sockaddr_print(&cand->addr, addrinfo, 645 sizeof(addrinfo), 3), 646 cand->transport_id)); 643 647 } 644 648 } … … 941 945 * have not been created. 942 946 */ 943 if (!comp || comp->creating) return; 947 if (!comp || comp->creating) { 948 PJ_LOG(5, (ice_st->obj_name, "ICE init update: creating comp %d", 949 (comp?comp->comp_id:(i+1)) )); 950 return; 951 } 944 952 945 953 for (j=0; j<comp->cand_cnt; ++j) { 946 954 pj_ice_sess_cand *cand = &comp->cand_list[j]; 947 955 948 if (cand->status == PJ_EPENDING) 956 if (cand->status == PJ_EPENDING) { 957 PJ_LOG(5, (ice_st->obj_name, "ICE init update: " 958 "comp %d/%d[%s] is pending", 959 comp->comp_id, j, 960 pj_ice_get_cand_type_name(cand->type))); 949 961 return; 962 } 950 963 } 951 964 } … … 1957 1970 char ipaddr[PJ_INET6_ADDRSTRLEN+8]; 1958 1971 pj_ice_sess_cand *cand = NULL; 1959 unsigned i ;1972 unsigned i, cand_idx = 0xFF; 1960 1973 1961 1974 comp->turn[tp_idx].err_cnt = 0; … … 1973 1986 { 1974 1987 cand = &comp->cand_list[i]; 1988 cand_idx = i; 1975 1989 break; 1976 1990 } … … 2008 2022 2009 2023 PJ_LOG(4,(comp->ice_st->obj_name, 2010 "Comp %d: TURN allocation complete, relay address is %s", 2011 comp->comp_id, 2024 "Comp %d/%d: TURN allocation (tpid=%d) complete, " 2025 "relay address is %s", 2026 comp->comp_id, cand_idx, cand->transport_id, 2012 2027 pj_sockaddr_print(&rel_info.relay_addr, ipaddr, 2013 2028 sizeof(ipaddr), 3))); … … 2020 2035 { 2021 2036 pj_ice_sess_cand *cand = NULL; 2022 unsigned i ;2037 unsigned i, cand_idx = 0xFF; 2023 2038 2024 2039 /* DNS resolution or TURN transport creation/allocation … … 2040 2055 { 2041 2056 cand = &comp->cand_list[i]; 2057 cand_idx = i; 2042 2058 break; 2043 2059 } … … 2050 2066 * to the list. 2051 2067 */ 2052 if (cand) cand->status = PJ_ERESOLVE; 2068 if (cand) { 2069 cand->status = PJ_ERESOLVE; 2070 PJ_LOG(4,(comp->ice_st->obj_name, 2071 "Comp %d/%d: TURN resolving (tpid=%d) failed", 2072 comp->comp_id, cand_idx, cand->transport_id)); 2073 } 2053 2074 2054 2075 sess_init_update(comp->ice_st); -
pjproject/trunk/pjnath/src/pjnath/turn_sock.c
r5474 r5521 429 429 pj_grp_lock_release(turn_sock->grp_lock); 430 430 return status; 431 } else if (!turn_sock->sess) { 432 /* TURN session may have been destroyed here, i.e: when DNS resolution 433 * completed synchronously and TURN allocation failed. 434 */ 435 PJ_LOG(4,(turn_sock->obj_name, "TURN session destroyed in setting " 436 "TURN server")); 437 pj_grp_lock_release(turn_sock->grp_lock); 438 return PJ_EGONE; 431 439 } 432 440 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5510 r5521 1742 1742 call->med_ch_mutex = NULL; 1743 1743 } 1744 1745 PJ_PERROR(5,(THIS_FILE, status, 1746 "Call %d: media transport initialization complete", call_id)); 1744 1747 1745 1748 if (status != PJ_SUCCESS) {
Note: See TracChangeset
for help on using the changeset viewer.