Changeset 1338


Ignore:
Timestamp:
Jun 5, 2007 11:48:15 AM (17 years ago)
Author:
bennylp
Message:

Fixed assertion error in ice_strans.c, when response is received before get_stun_mapped_addr() returns

File:
1 edited

Legend:

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

    r1298 r1338  
    676676    tdata->user_data = (void*)cand; 
    677677 
    678     /* Send STUN binding request */ 
    679     status = pj_stun_session_send_msg(comp->stun_sess, PJ_FALSE,  
    680                                       &ice_st->stun_srv,  
    681                                       sizeof(pj_sockaddr_in), tdata); 
    682     if (status != PJ_SUCCESS) 
    683         return status; 
    684  
     678    /* Add pending count first, since stun_on_request_complete() 
     679     * may be called before this function completes 
     680     */ 
     681    comp->pending_cnt++; 
    685682 
    686683    /* Add new alias to this component */ 
     
    694691    ++comp->cand_cnt; 
    695692 
    696     /* Add pending count for this component */ 
    697     comp->pending_cnt++; 
     693    /* Send STUN binding request */ 
     694    status = pj_stun_session_send_msg(comp->stun_sess, PJ_FALSE,  
     695                                      &ice_st->stun_srv,  
     696                                      sizeof(pj_sockaddr_in), tdata); 
     697    if (status != PJ_SUCCESS) { 
     698        --comp->pending_cnt; 
     699        --comp->cand_cnt; 
     700        return status; 
     701    } 
    698702 
    699703    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.