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

Function mod_init

modules/alias_db/alias_db.c:188–211  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

186 *
187 */
188static int mod_init(void)
189{
190 LM_INFO("initializing...\n");
191 init_db_url( db_url , 0 /*cannot be null*/);
192 user_column.len = strlen(user_column.s);
193 domain_column.len = strlen(domain_column.s);
194 alias_domain_column.len = strlen(alias_domain_column.s);
195 alias_user_column.len = strlen(alias_user_column.s);
196 if (domain_prefix.s)
197 domain_prefix.len = strlen(domain_prefix.s);
198
199 /* Find a database module */
200 if (db_bind_mod(&db_url, &adbf)) {
201 LM_ERR("unable to bind database module\n");
202 return -1;
203 }
204 if (!DB_CAPABILITY(adbf, DB_CAP_QUERY)) {
205 LM_CRIT("database modules does not "
206 "provide all functions needed by alias_db module\n");
207 return -1;
208 }
209
210 return 0;
211}
212
213
214/**

Callers

nothing calls this directly

Calls 1

db_bind_modFunction · 0.85

Tested by

no test coverage detected