int nr_ice_candidate_pair_destroy(nr_ice_cand_pair **pairp) { nr_ice_cand_pair *pair; if(!pairp || !*pairp) return(0); pair=*pairp; *pairp=0; RFREE(pair->as_string); RFREE(pair->foundation); nr_ice_socket_deregister(pair->local->isock,pair->stun_client_handle); if (pair->stun_client) { RFREE(pair->stun_client->params.ice_binding_request.username); RFREE(pair->stun_client->params.ice_binding_request.password.data); nr_stun_client_ctx_destroy(&pair->stun_client); } NR_async_timer_cancel(pair->stun_cb_timer); NR_async_timer_cancel(pair->restart_role_change_cb_timer); NR_async_timer_cancel(pair->restart_nominated_cb_timer); RFREE(pair); return(0); }
int nr_ice_candidate_pair_destroy(nr_ice_cand_pair **pairp) { nr_ice_cand_pair *pair; if(!pairp || !*pairp) return(0); pair=*pairp; *pairp=0; RFREE(pair->as_string); RFREE(pair->foundation); nr_ice_socket_deregister(pair->local->isock,pair->stun_client_handle); RFREE(pair->stun_client->params.ice_binding_request.username); RFREE(pair->stun_client->params.ice_binding_request.password.data); nr_stun_client_ctx_destroy(&pair->stun_client); RFREE(pair->r2l_user); RFREE(pair->r2l_pwd.data); RFREE(pair); return(0); }