Module: sip-router Branch: master Commit: 732892b20b5639d698c195d4e742226415fe17f7 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=732892b2...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Mon Apr 23 12:39:53 2012 +0100
modules/db_postgres: Replaced init_nopool() with init2()
---
modules/db_postgres/km_db_postgres.c | 2 +- modules/db_postgres/km_dbase.c | 6 +++--- modules/db_postgres/km_dbase.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/db_postgres/km_db_postgres.c b/modules/db_postgres/km_db_postgres.c index 74b1a96..f56a2ff 100644 --- a/modules/db_postgres/km_db_postgres.c +++ b/modules/db_postgres/km_db_postgres.c @@ -85,7 +85,7 @@ int db_postgres_bind_api(db_func_t *dbb)
dbb->use_table = db_postgres_use_table; dbb->init = db_postgres_init; - dbb->init_nopool = db_postgres_init_nopool; + dbb->init2 = db_postgres_init2; dbb->close = db_postgres_close; dbb->query = db_postgres_query; dbb->fetch_result = db_postgres_fetch_result; diff --git a/modules/db_postgres/km_dbase.c b/modules/db_postgres/km_dbase.c index e664a69..5e79d52 100644 --- a/modules/db_postgres/km_dbase.c +++ b/modules/db_postgres/km_dbase.c @@ -130,7 +130,7 @@ static void db_postgres_free_query(const db1_con_t* _con); */ db1_con_t *db_postgres_init(const str* _url) { - return db_do_init(_url, (void*) db_postgres_new_connection, 0); + return db_do_init(_url, (void*) db_postgres_new_connection); }
/*! @@ -139,9 +139,9 @@ db1_con_t *db_postgres_init(const str* _url) * \return database connection on success, NULL on error * \note this function must be called prior to any database functions */ -db1_con_t *db_postgres_init_nopool(const str* _url) +db1_con_t *db_postgres_init2(const str* _url, db_pooling_t pooling) { - return db_do_init(_url, (void*) db_postgres_new_connection, 1); + return db_do_init2(_url, (void*) db_postgres_new_connection, pooling); }
/*! diff --git a/modules/db_postgres/km_dbase.h b/modules/db_postgres/km_dbase.h index c219a32..60c824b 100644 --- a/modules/db_postgres/km_dbase.h +++ b/modules/db_postgres/km_dbase.h @@ -49,7 +49,7 @@ db1_con_t* db_postgres_init(const str* _url); /* * Initialize database connection - no pooling */ -db1_con_t* db_postgres_init_nopool(const str* _url); +db1_con_t* db_postgres_init2(const str* _url, db_pooling_t pooling);
/* * Close a database connection