#include "db_id.h"
#include "db_con.h"


Go to the source code of this file.
Data Structures | |
| struct | pool_con |
Functions | |
| struct pool_con * | pool_get (const struct db_id *id) |
| void | pool_insert (struct pool_con *con) |
| int | pool_remove (struct pool_con *con) |
Definition in file db_pool.h.
Search the pool for a connection with the identifier equal to the id.
| id | searched id |
Definition at line 43 of file db_pool.c.
References cmp_db_id(), pool_con::id, LM_ERR, pool_con::next, and pool_con::ref.
Referenced by db_do_init().
| void pool_insert | ( | struct pool_con * | con | ) |
Insert a new connection into the pool.
| con | the inserted connection |
Definition at line 68 of file db_pool.c.
References pool_con::next.
Referenced by db_do_init().
| int pool_remove | ( | struct pool_con * | con | ) |
Release a connection from the pool, the function would return 1 when if the connection is not referenced anymore and thus can be closed and deleted by the backend. The function returns 0 if the connection should still be kept open because some other module is still using it. The function returns -1 if the connection is not in the pool.
| con | connection that should be removed |
Definition at line 87 of file db_pool.c.
References LM_DBG, LM_ERR, pool_con::next, and pool_con::ref.
Referenced by db_do_close().
1.5.6