Changeset 4409 for pjproject


Ignore:
Timestamp:
Mar 1, 2013 3:04:16 AM (12 years ago)
Author:
riza
Message:

Re #1604: backported to 1.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjnath/src/pjnath/ice_strans.c

    r4384 r4409  
    710710PJ_DEF(pj_status_t) pj_ice_strans_destroy(pj_ice_strans *ice_st) 
    711711{ 
    712     char obj_name[PJ_MAX_OBJ_NAME]; 
    713  
    714712    PJ_ASSERT_RETURN(ice_st, PJ_EINVAL); 
    715  
     713    sess_add_ref(ice_st); 
    716714    ice_st->destroy_req = PJ_TRUE; 
    717     if (pj_atomic_get(ice_st->busy_cnt) > 0) { 
     715    if (sess_dec_ref(ice_st)) { 
    718716        PJ_LOG(5,(ice_st->obj_name,  
    719717                  "ICE strans object is busy, will destroy later")); 
    720718        return PJ_EPENDING; 
    721719    } 
    722      
    723     pj_memcpy(obj_name, ice_st->obj_name, PJ_MAX_OBJ_NAME); 
    724     destroy_ice_st(ice_st); 
    725  
    726     PJ_LOG(4,(obj_name, "ICE stream transport destroyed")); 
    727720    return PJ_SUCCESS; 
    728721} 
     
    746739    pj_assert(count >= 0); 
    747740    if (count==0 && ice_st->destroy_req) { 
    748         pj_ice_strans_destroy(ice_st); 
     741        destroy_ice_st(ice_st); 
    749742        return PJ_FALSE; 
    750743    } else { 
Note: See TracChangeset for help on using the changeset viewer.