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

Function ds_destroy_data_set

modules/dispatcher/dispatch.c:127–160  ·  view source on GitHub ↗

destroy entire dispatching data */

Source from the content-addressed store, hash-verified

125
126/* destroy entire dispatching data */
127static void ds_destroy_data_set( ds_data_t *d)
128{
129 ds_set_p sp;
130 ds_set_p sp_curr;
131 ds_dest_p dest;
132 str ds_str = {MI_SSTR("dispatcher")};
133
134 /* free the list of sets */
135 sp = d->sets;
136 while(sp) {
137 sp_curr = sp;
138 sp = sp->next;
139
140 dest = sp_curr->dlist;
141 if (dest) {
142 do {
143 if(dest->uri.s!=NULL)
144 shm_free(dest->uri.s);
145 if(dest->param)
146 shm_free(dest->param);
147 if (dest->fs_sock)
148 fs_api.put_stats_evs(dest->fs_sock, &ds_str);
149 if (dest->script_attrs.s)
150 shm_free(dest->script_attrs.s);
151 dest = dest->next;
152 }while(dest);
153 shm_free(sp_curr->dlist);
154 }
155 shm_free(sp_curr);
156 }
157
158 /* free the data holder */
159 shm_free(d);
160}
161
162
163/* destroy current dispatching data */

Callers 3

ds_destroy_dataFunction · 0.85
ds_load_dataFunction · 0.85
ds_reload_dbFunction · 0.85

Calls 1

shm_freeFunction · 0.85

Tested by

no test coverage detected