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

Function remove_from_hash_table_unsafe

modules/tm/h_table.c:431–453  ·  view source on GitHub ↗

Un-link a cell from hash_table, but the cell itself is not released */

Source from the content-addressed store, hash-verified

429
430/* Un-link a cell from hash_table, but the cell itself is not released */
431void remove_from_hash_table_unsafe( struct cell * p_cell)
432{
433 struct entry* p_entry = &(tm_table->entrys[p_cell->hash_index]);
434
435 if ( p_cell->prev_cell )
436 p_cell->prev_cell->next_cell = p_cell->next_cell;
437 else
438 p_entry->first_cell = p_cell->next_cell;
439
440 if ( p_cell->next_cell )
441 p_cell->next_cell->prev_cell = p_cell->prev_cell;
442 else
443 p_entry->last_cell = p_cell->prev_cell;
444# ifdef EXTRA_DEBUG
445 if (p_entry->cur_entries==0) {
446 LM_CRIT("bad things happened: cur_entries=0\n");
447 abort();
448 }
449# endif
450 /* update stats */
451 p_entry->cur_entries--;
452 if_update_stat(tm_enable_stats, tm_trans_inuse , -1 );
453}

Callers 2

t_uacFunction · 0.85
wait_handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected