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

Function child_init

modules/cachedb_couchbase/cachedb_couchbase.c:124–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124static int child_init(int rank)
125{
126 struct cachedb_url *it;
127 cachedb_con *con;
128
129 for (it = couchbase_script_urls;it;it=it->next) {
130 LM_DBG("iterating through couchbase conns - [%.*s]\n",it->url.len,it->url.s);
131 con = couchbase_init(&it->url);
132 if (con == NULL) {
133 LM_ERR("failed to open connection\n");
134 return -1;
135 }
136 if (cachedb_put_connection(&cache_mod_name,con) < 0) {
137 LM_ERR("failed to insert connection\n");
138 return -1;
139 }
140 }
141
142 cachedb_free_url(couchbase_script_urls);
143 return 0;
144}
145
146/*
147 * destroy function

Callers

nothing calls this directly

Calls 3

couchbase_initFunction · 0.85
cachedb_put_connectionFunction · 0.85
cachedb_free_urlFunction · 0.85

Tested by

no test coverage detected