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

Function cachedb_get_connection

cachedb/cachedb.c:263–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263cachedb_con *cachedb_get_connection(cachedb_engine *cde,str *group_name)
264{
265 cachedb_con_list *ret;
266
267 if (cde == NULL) {
268 LM_ERR("no such cachedb engine\n");
269 return 0;
270 }
271
272 if (group_name == NULL || group_name->s == NULL || group_name->len == 0)
273 return cde->default_connection;
274 else {
275 for (ret=cde->connections;ret;ret=ret->next) {
276 if (ret->grp.len == group_name->len &&
277 memcmp(ret->grp.s,group_name->s,group_name->len) == 0)
278 return ret->connection;
279 }
280 return NULL;
281 }
282}
283
284void cachedb_end_connections(str *cachedb_name)
285{

Callers 8

cachedb_removeFunction · 0.85
cachedb_storeFunction · 0.85
cachedb_fetchFunction · 0.85
cachedb_counter_fetchFunction · 0.85
cachedb_addFunction · 0.85
cachedb_subFunction · 0.85
cachedb_raw_queryFunction · 0.85
test_cachedb_apiFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_cachedb_apiFunction · 0.68