Ignore:
Timestamp:
Dec 28, 2016 3:40:07 AM (8 years ago)
Author:
nanang
Message:

Re #1900: More merged from trunk (r5512 mistakenly contains merged changes in third-party dir only).

Location:
pjproject/branches/projects/uwp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/uwp

  • pjproject/branches/projects/uwp/pjnath/src/pjnath/ice_session.c

    r5184 r5513  
    397397    /* Initialize transport datas */ 
    398398    for (i=0; i<PJ_ARRAY_SIZE(ice->tp_data); ++i) { 
    399         ice->tp_data[i].transport_id = i; 
     399        ice->tp_data[i].transport_id = 0; 
    400400        ice->tp_data[i].has_req_data = PJ_FALSE; 
    401401    } 
     
    724724    pj_status_t status = PJ_SUCCESS; 
    725725    char address[PJ_INET6_ADDRSTRLEN]; 
     726    unsigned i; 
    726727 
    727728    PJ_ASSERT_RETURN(ice && comp_id &&  
     
    748749        rel_addr = base_addr; 
    749750    pj_memcpy(&lcand->rel_addr, rel_addr, addr_len); 
     751 
     752    /* Update transport data */ 
     753    for (i = 0; i < PJ_ARRAY_SIZE(ice->tp_data); ++i) { 
     754        /* Check if this transport has been registered */ 
     755        if (ice->tp_data[i].transport_id == transport_id) 
     756            break; 
     757 
     758        if (ice->tp_data[i].transport_id == 0) { 
     759            /* Found an empty slot, register this transport here */ 
     760            ice->tp_data[i].transport_id = transport_id; 
     761            break; 
     762        } 
     763    } 
     764    pj_assert(i < PJ_ARRAY_SIZE(ice->tp_data) && 
     765              ice->tp_data[i].transport_id == transport_id); 
    750766 
    751767    pj_ansi_strcpy(ice->tmp.txt, pj_sockaddr_print(&lcand->addr, address, 
     
    16621678            pj_ice_sess_cand *lcand = &ice->lcand[i]; 
    16631679            pj_ice_sess_cand *rcand = &ice->rcand[j]; 
    1664             pj_ice_sess_check *chk = &clist->checks[clist->count]; 
     1680            pj_ice_sess_check *chk = NULL; 
    16651681 
    16661682            if (clist->count >= PJ_ICE_MAX_CHECKS) { 
     
    16681684                return PJ_ETOOMANY; 
    16691685            }  
     1686 
     1687           chk = &clist->checks[clist->count]; 
    16701688 
    16711689            /* A local candidate is paired with a remote candidate if 
     
    18751893            status = perform_check(ice, clist, i, ice->is_nominating); 
    18761894            if (status != PJ_SUCCESS) { 
    1877                 pj_grp_lock_release(ice->grp_lock); 
    1878                 pj_log_pop_indent(); 
    1879                 return status; 
     1895                check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, 
     1896                                status); 
     1897                on_check_complete(ice, check); 
    18801898            } 
    18811899 
     
    18951913                status = perform_check(ice, clist, i, ice->is_nominating); 
    18961914                if (status != PJ_SUCCESS) { 
    1897                     pj_grp_lock_release(ice->grp_lock); 
    1898                     pj_log_pop_indent(); 
    1899                     return status; 
     1915                    check_set_state(ice, check, 
     1916                                    PJ_ICE_SESS_CHECK_STATE_FAILED, status); 
     1917                    on_check_complete(ice, check); 
    19001918                } 
    19011919 
Note: See TracChangeset for help on using the changeset viewer.