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

Function child_init

modules/cachedb_redis/cachedb_redis.c:221–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221static int child_init(int rank)
222{
223 struct cachedb_url *it;
224 cachedb_con *con;
225
226 for (it = redis_script_urls;it;it=it->next) {
227 LM_DBG("iterating through conns - [%s]\n", db_url_escape(&it->url));
228 con = redis_init(&it->url);
229 if (con == NULL) {
230 LM_ERR("failed to open connection\n");
231 return -1;
232 }
233 if (cachedb_put_connection(&cache_mod_name,con) < 0) {
234 LM_ERR("failed to insert connection\n");
235 return -1;
236 }
237 }
238
239 cachedb_free_url(redis_script_urls);
240 return 0;
241}
242
243/*
244 * destroy function

Callers

nothing calls this directly

Calls 4

db_url_escapeFunction · 0.85
redis_initFunction · 0.85
cachedb_put_connectionFunction · 0.85
cachedb_free_urlFunction · 0.85

Tested by

no test coverage detected