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

Function init_black_lists

blacklists.c:92–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90};
91
92int init_black_lists(void)
93{
94 bl_ctx_idx = context_register_int(CONTEXT_GLOBAL, NULL);
95 if (bl_ctx_idx < 0)
96 return -1;
97
98 /* register timer routine */
99 if (register_timer("blcore-expire", delete_expired_routine, 0, 1,
100 TIMER_FLAG_SKIP_ON_DELAY) < 0) {
101 LM_ERR("failed to register timer\n");
102 return -1;
103 }
104
105 /* register MI commands */
106 if (register_mi_mod("blacklists", mi_bl_cmds) < 0) {
107 LM_ERR("unable to register MI cmds\n");
108 return -1;
109 }
110
111 return 0;
112}
113
114/*
115 * get_bl_marker() and store_bl_marker():

Callers

nothing calls this directly

Calls 3

context_register_intFunction · 0.85
register_timerFunction · 0.85
register_mi_modFunction · 0.85

Tested by

no test coverage detected