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

Function init_b2bl_htable

modules/b2b_logic/records.c:832–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830}
831
832int init_b2bl_htable(void)
833{
834 int i;
835 b2bl_htable = (b2bl_table_t)shm_malloc(b2bl_hsize* sizeof(b2bl_entry_t));
836 if(!b2bl_htable)
837 ERR_MEM(SHARE_MEM);
838
839 memset(b2bl_htable, 0, b2bl_hsize* sizeof(b2bl_entry_t));
840 for(i= 0; i< b2bl_hsize; i++)
841 {
842 lock_init(&b2bl_htable[i].lock);
843 b2bl_htable[i].first = NULL;
844 }
845
846 return 0;
847error:
848 return -1;
849}
850
851void destroy_b2bl_htable(void)
852{

Callers 1

mod_initFunction · 0.85

Calls 2

shm_mallocFunction · 0.85
lock_initFunction · 0.85

Tested by

no test coverage detected