Changeset 6072
- Timestamp:
- Sep 23, 2019 7:27:53 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r6071 r6072 1074 1074 { 1075 1075 unsigned i; 1076 pj_status_t status = PJ_EUNKNOWN; 1076 1077 1077 1078 /* Ignore if ICE is destroying or init callback has been called */ … … 1093 1094 } 1094 1095 1096 status = PJ_EUNKNOWN; 1095 1097 for (j=0; j<comp->cand_cnt; ++j) { 1096 1098 pj_ice_sess_cand *cand = &comp->cand_list[j]; … … 1103 1105 return; 1104 1106 } 1105 } 1106 } 1107 1108 /* All candidates have been gathered */ 1107 1108 if (status == PJ_EUNKNOWN) { 1109 status = cand->status; 1110 } else { 1111 /* We only need one successful candidate. */ 1112 if (cand->status == PJ_SUCCESS) 1113 status = PJ_SUCCESS; 1114 } 1115 } 1116 1117 if (status != PJ_SUCCESS) 1118 break; 1119 } 1120 1121 /* All candidates have been gathered or there's no successful 1122 * candidate for a component. 1123 */ 1109 1124 ice_st->cb_called = PJ_TRUE; 1110 1125 ice_st->state = PJ_ICE_STRANS_STATE_READY; 1111 1126 if (ice_st->cb.on_ice_complete) 1112 1127 (*ice_st->cb.on_ice_complete)(ice_st, PJ_ICE_STRANS_OP_INIT, 1113 PJ_SUCCESS);1128 status); 1114 1129 } 1115 1130 … … 2504 2519 */ 2505 2520 if (cand) { 2521 pj_turn_session_info info; 2522 2523 pj_turn_sock_get_info(turn_sock, &info); 2506 2524 cand->status = (old_state == PJ_TURN_STATE_RESOLVING)? 2507 PJ_ERESOLVE : PJ_EINVALIDOP;2525 PJ_ERESOLVE : info.last_status; 2508 2526 PJ_LOG(4,(comp->ice_st->obj_name, 2509 2527 "Comp %d/%d: TURN error (tpid=%d) during state %s",
Note: See TracChangeset
for help on using the changeset viewer.