Ignore:
Timestamp:
Jul 29, 2019 7:07:11 AM (5 years ago)
Author:
ming
Message:

Fixed #2218: ICE initialization issue if an error happens during allocating state

Thanks to Sébastien Blin for the patch.

File:
1 edited

Legend:

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

    r6040 r6048  
    14041404            pj_sockaddr addrs[PJ_ICE_ST_MAX_CAND]; 
    14051405            unsigned j, count=0; 
     1406 
     1407            if (!comp->turn[n].sock) 
     1408                continue; 
    14061409 
    14071410            /* Gather remote addresses for this component */ 
     
    22022205 
    22032206    } else if ((old_state == PJ_TURN_STATE_RESOLVING || 
    2204                 old_state == PJ_TURN_STATE_RESOLVED) && 
    2205                new_state == PJ_TURN_STATE_DESTROYING) 
     2207                old_state == PJ_TURN_STATE_RESOLVED || 
     2208                old_state == PJ_TURN_STATE_ALLOCATING) && 
     2209               new_state >= PJ_TURN_STATE_DEALLOCATING) 
    22062210    { 
    22072211        pj_ice_sess_cand *cand = NULL; 
     
    22382242         */ 
    22392243        if (cand) { 
    2240             cand->status = PJ_ERESOLVE; 
     2244            cand->status = (old_state == PJ_TURN_STATE_RESOLVING)? 
     2245                           PJ_ERESOLVE : PJ_EINVALIDOP; 
    22412246            PJ_LOG(4,(comp->ice_st->obj_name, 
    2242                       "Comp %d/%d: TURN resolving (tpid=%d) failed", 
    2243                       comp->comp_id, cand_idx, cand->transport_id)); 
     2247                      "Comp %d/%d: TURN error (tpid=%d) during state %s", 
     2248                      comp->comp_id, cand_idx, cand->transport_id, 
     2249                      pj_turn_state_name(old_state))); 
    22442250        } 
    22452251 
Note: See TracChangeset for help on using the changeset viewer.