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

Function pool_get

db/db_pool.c:40–59  ·  view source on GitHub ↗

* Search the pool for a connection with * the identifier equal to id, NULL is returned * when no connection is found */

Source from the content-addressed store, hash-verified

38 * when no connection is found
39 */
40struct pool_con* pool_get(const struct db_id* id)
41{
42 struct pool_con* ptr;
43
44 if (!id) {
45 LM_ERR("invalid parameter value\n");
46 return 0;
47 }
48
49 ptr = db_pool;
50 while (ptr) {
51 if (cmp_db_id(id, ptr->id)) {
52 ptr->ref++;
53 return ptr;
54 }
55 ptr = ptr->next;
56 }
57
58 return 0;
59}
60
61
62/*

Callers 1

db_do_initFunction · 0.85

Calls 1

cmp_db_idFunction · 0.85

Tested by

no test coverage detected