Module: sip-router Branch: master Commit: 0a946efc528dfbf2d35f9c22b94040bc0d596f1e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0a946efc...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Mar 13 14:18:35 2012 +0100
db_postgres: added mod destroy function
- clear locks set used for replace command
---
modules/db_postgres/pg_mod.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/db_postgres/pg_mod.c b/modules/db_postgres/pg_mod.c index 57dd2fd..1b2d9f7 100644 --- a/modules/db_postgres/pg_mod.c +++ b/modules/db_postgres/pg_mod.c @@ -51,10 +51,11 @@ #include <float.h> #endif
-static int pg_mod_init(void); - MODULE_VERSION
+static int pg_mod_init(void); +static void pg_mod_destroy(void); + int pg_connect_timeout = 0; /* Default is unlimited */ int pg_retries = 2; /* How many times should the module try re-execute failed commands. * 0 disables reconnecting */ @@ -102,7 +103,7 @@ struct module_exports exports = { params, /* module parameters */ pg_mod_init, /* module initialization function */ 0, /* response function*/ - 0, /* destroy function */ + pg_mod_destroy, /* destroy function */ 0, /* oncancel function */ 0 /* per-child init function */ }; @@ -555,4 +556,9 @@ static int pg_mod_init(void) return km_postgres_mod_init(); }
+static void pg_mod_destroy(void) +{ + pg_destroy_lock_set(); +} + /** @} */