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

Function db_connect_head

modules/drouting/drouting.c:2256–2269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2254
2255
2256static int db_connect_head(struct head_db *x) {
2257
2258 if( *(x->db_con) ) {
2259 LM_INFO("db_con already present\n");
2260 return 1;
2261 }
2262 if( x->db_url.s && (*(x->db_con) = x->db_funcs.init(&(x->db_url)))==0 ) {
2263 LM_ERR("cannot initialize database connection"
2264 "(partition:%.*s, db_url:%.*s, len:%d)\n", x->partition.len,
2265 x->partition.s, x->db_url.len, x->db_url.s, x->db_url.len);
2266 return -1;
2267 }
2268 return 0;
2269}
2270
2271
2272/* simple wrapper over dr_reload_data to make it compatible with ipc_rpc_f,

Callers 2

dr_child_initFunction · 0.70
dr_exitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected