Changeset 4133 for pjproject/trunk
- Timestamp:
- May 21, 2012 2:00:17 PM (13 years ago)
- Location:
- pjproject/trunk/pjnath
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/ice_strans.h
r3553 r4133 270 270 pj_uint16_t port; 271 271 272 /** 273 * Ignore STUN resolution error and proceed with just local 274 * addresses. 275 * 276 * The default is PJ_FALSE 277 */ 278 pj_bool_t ignore_stun_error; 279 272 280 } stun; 273 281 -
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r3999 r4133 222 222 223 223 cfg->stun.max_host_cands = 64; 224 cfg->stun.ignore_stun_error = PJ_FALSE; 224 225 } 225 226 … … 1502 1503 if (cand) 1503 1504 cand->status = status; 1504 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, "DNS resolution failed", 1505 status); 1505 if (!ice_st->cfg.stun.ignore_stun_error) { 1506 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 1507 "DNS resolution failed", status); 1508 } else { 1509 PJ_LOG(4,(ice_st->obj_name, 1510 "STUN error is ignored for comp %d", 1511 comp->comp_id)); 1512 } 1506 1513 } 1507 1514 break; … … 1540 1547 --comp->default_cand; 1541 1548 } else if (comp->default_cand == idx) { 1542 comp->default_cand = 0;1549 comp->default_cand = !idx; 1543 1550 } 1544 1551 … … 1568 1575 if (cand) 1569 1576 cand->status = status; 1570 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 1571 "STUN binding request failed", status); 1577 if (!ice_st->cfg.stun.ignore_stun_error) { 1578 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 1579 "STUN binding request failed", status); 1580 } else { 1581 PJ_LOG(4,(ice_st->obj_name, 1582 "STUN error is ignored for comp %d", 1583 comp->comp_id)); 1584 1585 if (cand) { 1586 unsigned idx = cand - comp->cand_list; 1587 1588 /* Update default candidate index */ 1589 if (comp->default_cand == idx) { 1590 comp->default_cand = !idx; 1591 } 1592 } 1593 1594 sess_init_update(ice_st); 1595 } 1572 1596 } 1573 1597 break; … … 1576 1600 pj_assert(cand != NULL); 1577 1601 cand->status = status; 1578 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 1579 "STUN keep-alive failed", status); 1602 if (!ice_st->cfg.stun.ignore_stun_error) { 1603 sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 1604 "STUN keep-alive failed", status); 1605 } else { 1606 PJ_LOG(4,(ice_st->obj_name, "STUN error is ignored")); 1607 } 1580 1608 } 1581 1609 break;
Note: See TracChangeset
for help on using the changeset viewer.