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

Function mqueue_db_init_con

modules/mqueue/mqueue_db.c:39–58  ·  view source on GitHub ↗

* initialize database connection */

Source from the content-addressed store, hash-verified

37 * initialize database connection
38 */
39int mqueue_db_init_con(void)
40{
41 LM_DBG("mqueue_db_url=[%.*s]\n", mqueue_db_url.len, mqueue_db_url.s);
42 if(mqueue_db_url.len <= 0) {
43 LM_ERR("failed to connect to the database, no db url\n");
44 return -1;
45 }
46 /* binding to DB module */
47 if(db_bind_mod(&mqueue_db_url, &mq_dbf)) {
48 LM_ERR("database module not found\n");
49 return -1;
50 }
51
52 if(!DB_CAPABILITY(mq_dbf, DB_CAP_ALL)) {
53 LM_ERR("database module does not "
54 "implement all functions needed by the module\n");
55 return -1;
56 }
57 return 0;
58}
59
60/**
61 * open database connection

Callers 1

mqueue_db_open_conFunction · 0.85

Calls 1

db_bind_modFunction · 0.85

Tested by

no test coverage detected