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

Function insert_into_hash_table_unsafe

modules/tm/h_table.c:405–427  ·  view source on GitHub ↗

Takes an already created cell and links it into hash table on the * appropriate entry. */

Source from the content-addressed store, hash-verified

403/* Takes an already created cell and links it into hash table on the
404 * appropriate entry. */
405void insert_into_hash_table_unsafe( struct cell * p_cell, unsigned int _hash )
406{
407 struct entry* p_entry;
408
409 p_cell->hash_index=_hash;
410
411 /* locates the appropriate entry */
412 p_entry = &tm_table->entrys[ _hash ];
413
414 p_cell->label = p_entry->next_label++;
415 if ( p_entry->last_cell )
416 {
417 p_entry->last_cell->next_cell = p_cell;
418 p_cell->prev_cell = p_entry->last_cell;
419 } else p_entry->first_cell = p_cell;
420
421 p_entry->last_cell = p_cell;
422
423 /* update stats */
424 p_entry->cur_entries++;
425 p_entry->acc_entries++;
426 stats_trans_new( is_local(p_cell) );
427}
428
429
430/* Un-link a cell from hash_table, but the cell itself is not released */

Callers 2

t_uacFunction · 0.85
new_tFunction · 0.85

Calls 1

stats_trans_newFunction · 0.85

Tested by

no test coverage detected