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

Function child_init

modules/cachedb_dynamodb/cachedb_dynamodb.c:249–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249static int child_init(int rank)
250{
251 LM_DBG("initializing cachedb_dynamodb child ...\n");
252
253 cachedb_con *con;
254 struct cachedb_url *it;
255
256 for (it = dynamo_script_urls;it;it=it->next) {
257 LM_DBG("iterating through conns - [%s]\n", db_url_escape(&it->url));
258 con = dynamodb_init(&it->url);
259 if (con == NULL) {
260 LM_ERR("failed to open connection\n");
261 return -1;
262 }
263 if (cachedb_put_connection(&cache_mod_name, con) < 0) {
264 LM_ERR("failed to insert connection\n");
265 return -1;
266 }
267
268 }
269
270 cachedb_free_url(dynamo_script_urls);
271 return 0;
272}
273
274/*
275 * destroy function

Callers

nothing calls this directly

Calls 4

db_url_escapeFunction · 0.85
dynamodb_initFunction · 0.85
cachedb_put_connectionFunction · 0.85
cachedb_free_urlFunction · 0.85

Tested by

no test coverage detected