MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / free_rt_data

Function free_rt_data

modules/drouting/routing.c:794–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794 void
795free_rt_data(
796 rt_data_t* rt_data,
797 osips_free_f free_f
798 )
799{
800 int j;
801 if(NULL!=rt_data) {
802 /* del GW list */
803 del_pgw_list(rt_data->pgw_tree);
804 rt_data->pgw_tree = 0 ;
805 /* del prefix tree */
806 del_tree(rt_data->pt, free_f);
807 rt_data->pt = 0 ;
808 /* del prefixless rules */
809 if(NULL!=rt_data->noprefix.rg) {
810 for(j=0;j<rt_data->noprefix.rg_pos;j++) {
811 if(rt_data->noprefix.rg[j].rtlw !=NULL) {
812 del_rt_list(rt_data->noprefix.rg[j].rtlw, free_f);
813 rt_data->noprefix.rg[j].rtlw = 0;
814 }
815 }
816 func_free(free_f, rt_data->noprefix.rg);
817 rt_data->noprefix.rg = 0;
818 }
819 /* del carriers */
820 del_carriers_list(rt_data->carriers_tree);
821 rt_data->carriers_tree=0;
822 /* del top level */
823 func_free(free_f, rt_data);
824 }
825}

Callers 4

dr_load_routing_infoFunction · 0.85
dr_reload_data_headFunction · 0.85
clean_head_cacheFunction · 0.85
dr_exitFunction · 0.85

Calls 4

del_pgw_listFunction · 0.85
del_rt_listFunction · 0.85
del_carriers_listFunction · 0.85
del_treeFunction · 0.70

Tested by

no test coverage detected