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

Function child_init

modules/dns_cache/dns_cache.c:121–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121static int child_init(int rank)
122{
123 if (cachedb_bind_mod(&cachedb_url, &cdbf) < 0) {
124 LM_ERR("cannot bind functions for db_url %s\n",
125 db_url_escape(&cachedb_url));
126 return -1;
127 }
128
129 if (!CACHEDB_CAPABILITY(&cdbf,
130 CACHEDB_CAP_GET|CACHEDB_CAP_SET)) {
131 LM_ERR("not enough capabilities\n");
132 return -1;
133 }
134
135 cdbc = cdbf.init(&cachedb_url);
136 if (!cdbc) {
137 LM_ERR("cannot connect to db_url %s\n", db_url_escape(&cachedb_url));
138 return -1;
139 }
140
141 return 0;
142}
143
144/*
145 * destroy function

Callers

nothing calls this directly

Calls 2

cachedb_bind_modFunction · 0.85
db_url_escapeFunction · 0.85

Tested by

no test coverage detected