void _eXosip_call_free (struct eXosip_t *excontext, eXosip_call_t * jc) { eXosip_dialog_t *jd; if (jc->c_inc_tr != NULL && jc->c_inc_tr->orig_request != NULL && jc->c_inc_tr->orig_request->call_id != NULL && jc->c_inc_tr->orig_request->call_id->number != NULL) _eXosip_delete_nonce (excontext, jc->c_inc_tr->orig_request->call_id->number); else if (jc->c_out_tr != NULL && jc->c_out_tr->orig_request != NULL && jc->c_out_tr->orig_request->call_id != NULL && jc->c_out_tr->orig_request->call_id->number != NULL) _eXosip_delete_nonce (excontext, jc->c_out_tr->orig_request->call_id->number); for (jd = jc->c_dialogs; jd != NULL; jd = jc->c_dialogs) { REMOVE_ELEMENT (jc->c_dialogs, jd); _eXosip_dialog_free (excontext, jd); } _eXosip_delete_reserved (jc->c_inc_tr); _eXosip_delete_reserved (jc->c_out_tr); if (jc->c_inc_tr != NULL) osip_list_add (&excontext->j_transactions, jc->c_inc_tr, 0); if (jc->c_out_tr != NULL) osip_list_add (&excontext->j_transactions, jc->c_out_tr, 0); osip_free (jc); #ifndef MINISIZE excontext->statistics.allocated_calls--; #endif }
void _eXosip_subscribe_free(struct eXosip_t *excontext, eXosip_subscribe_t * js) { /* ... */ eXosip_dialog_t *jd; if (js->s_inc_tr != NULL && js->s_inc_tr->orig_request != NULL && js->s_inc_tr->orig_request->call_id != NULL && js->s_inc_tr->orig_request->call_id->number != NULL) _eXosip_delete_nonce(excontext, js->s_inc_tr->orig_request->call_id->number); else if (js->s_out_tr != NULL && js->s_out_tr->orig_request != NULL && js->s_out_tr->orig_request->call_id != NULL && js->s_out_tr->orig_request->call_id->number != NULL) _eXosip_delete_nonce(excontext, js->s_out_tr->orig_request->call_id->number); for (jd = js->s_dialogs; jd != NULL; jd = js->s_dialogs) { REMOVE_ELEMENT(js->s_dialogs, jd); _eXosip_dialog_free(excontext, jd); } _eXosip_delete_reserved(js->s_inc_tr); _eXosip_delete_reserved(js->s_out_tr); if (js->s_inc_tr != NULL) osip_list_add(&excontext->j_transactions, js->s_inc_tr, 0); if (js->s_out_tr != NULL) osip_list_add(&excontext->j_transactions, js->s_out_tr, 0); osip_free(js); }