Changeset 5465 for pjproject


Ignore:
Timestamp:
Oct 21, 2016 6:38:16 AM (7 years ago)
Author:
nanang
Message:

Fix #1972: Update ICE candidate status to non-PJ_EPENDING after TURN server name resolution fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r5366 r5465  
    19901990        sess_init_update(comp->ice_st); 
    19911991 
     1992    } else if (old_state == PJ_TURN_STATE_RESOLVING && 
     1993               new_state == PJ_TURN_STATE_DESTROYING) 
     1994    { 
     1995        pj_ice_sess_cand *cand = NULL; 
     1996        unsigned i; 
     1997 
     1998        /* DNS resolution has failed! */ 
     1999        ++comp->turn[tp_idx].err_cnt; 
     2000 
     2001        /* Unregister ourself from the TURN relay */ 
     2002        pj_turn_sock_set_user_data(turn_sock, NULL); 
     2003        comp->turn[tp_idx].sock = NULL; 
     2004 
     2005        /* Wait until initialization completes */ 
     2006        pj_grp_lock_acquire(comp->ice_st->grp_lock); 
     2007 
     2008        /* Find relayed candidate in the component */ 
     2009        for (i=0; i<comp->cand_cnt; ++i) { 
     2010            if (comp->cand_list[i].type == PJ_ICE_CAND_TYPE_RELAYED && 
     2011                comp->cand_list[i].transport_id == data->transport_id) 
     2012            { 
     2013                cand = &comp->cand_list[i]; 
     2014                break; 
     2015            } 
     2016        } 
     2017        pj_assert(cand != NULL); 
     2018 
     2019        pj_grp_lock_release(comp->ice_st->grp_lock); 
     2020 
     2021        cand->status = PJ_ERESOLVE; 
     2022 
     2023        sess_init_update(comp->ice_st); 
     2024 
    19922025    } else if (new_state >= PJ_TURN_STATE_DEALLOCATING) { 
    19932026        pj_turn_session_info info; 
Note: See TracChangeset for help on using the changeset viewer.