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

Function free_hash_table

modules/tm/h_table.c:347–369  ·  view source on GitHub ↗

Release all the data contained by the hash table. All the aux. structures * as sems, lists, etc, are also released */

Source from the content-addressed store, hash-verified

345/* Release all the data contained by the hash table. All the aux. structures
346 * as sems, lists, etc, are also released */
347void free_hash_table(void)
348{
349 struct cell* p_cell;
350 struct cell* tmp_cell;
351 int i;
352
353 if (tm_table)
354 {
355 /* remove the data contained by each entry */
356 for( i = 0 ; i<TM_TABLE_ENTRIES; i++)
357 {
358 release_entry_lock( (tm_table->entrys)+i );
359 /* delete all synonyms at hash-collision-slot i */
360 p_cell=tm_table->entrys[i].first_cell;
361 for( ; p_cell; p_cell = tmp_cell )
362 {
363 tmp_cell = p_cell->next_cell;
364 free_cell( p_cell );
365 }
366 }
367 shm_free(tm_table);
368 }
369}
370
371
372/*

Callers 1

tm_shutdownFunction · 0.70

Calls 3

release_entry_lockFunction · 0.85
free_cellFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected