Changeset 4409
- Timestamp:
- Mar 1, 2013 3:04:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjnath/src/pjnath/ice_strans.c
r4384 r4409 710 710 PJ_DEF(pj_status_t) pj_ice_strans_destroy(pj_ice_strans *ice_st) 711 711 { 712 char obj_name[PJ_MAX_OBJ_NAME];713 714 712 PJ_ASSERT_RETURN(ice_st, PJ_EINVAL); 715 713 sess_add_ref(ice_st); 716 714 ice_st->destroy_req = PJ_TRUE; 717 if ( pj_atomic_get(ice_st->busy_cnt) > 0) {715 if (sess_dec_ref(ice_st)) { 718 716 PJ_LOG(5,(ice_st->obj_name, 719 717 "ICE strans object is busy, will destroy later")); 720 718 return PJ_EPENDING; 721 719 } 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"));727 720 return PJ_SUCCESS; 728 721 } … … 746 739 pj_assert(count >= 0); 747 740 if (count==0 && ice_st->destroy_req) { 748 pj_ice_strans_destroy(ice_st);741 destroy_ice_st(ice_st); 749 742 return PJ_FALSE; 750 743 } else {
Note: See TracChangeset
for help on using the changeset viewer.