diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-08-21 02:11:39 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-08-21 02:11:39 +0000 |
commit | 0a27d8bfe5fa36d8cb600b5b520f9b5c7fbf0ed6 (patch) | |
tree | 270b9c46c1e644483d6d2a35b509f43218ba3252 /res/res_config_pgsql.c | |
parent | f60ada0be22cd646454278e102d384a5dbaf7d59 (diff) |
merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
- support for embedded modules
- support for static builds
- simpler cross-compilation support
- simpler module/loader interface (no exported symbols)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r-- | res/res_config_pgsql.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 02b067bc0..f004bfd13 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -66,8 +66,6 @@ static int parse_config(void); static int pgsql_reconnect(const char *database); static int realtime_pgsql_status(int fd, int argc, char **argv); -LOCAL_USER_DECL; - static char cli_realtime_pgsql_status_usage[] = "Usage: realtime pgsql status\n" " Shows connection information for the Postgresql RealTime driver\n"; @@ -553,7 +551,7 @@ static struct ast_config_engine pgsql_engine = { .update_func = update_pgsql }; -static int load_module(void *mod) +static int load_module(void) { parse_config(); @@ -577,7 +575,7 @@ static int load_module(void *mod) return 0; } -static int unload_module(void *mod) +static int unload_module(void) { /* Aquire control before doing anything to the module itself. */ ast_mutex_lock(&pgsql_lock); @@ -592,7 +590,7 @@ static int unload_module(void *mod) ast_verbose("Postgresql RealTime unloaded.\n"); } - STANDARD_HANGUP_LOCALUSERS; + ast_module_user_hangup_all(); /* Unlock so something else can destroy the lock. */ ast_mutex_unlock(&pgsql_lock); @@ -600,7 +598,7 @@ static int unload_module(void *mod) return 0; } -static int reload(void *mod) +static int reload(void) { /* Aquire control before doing anything to the module itself. */ ast_mutex_lock(&pgsql_lock); @@ -697,17 +695,6 @@ int parse_config(void) return 1; } -static const char *description(void) -{ - return "Postgresql RealTime Configuration Driver"; - -} - -static const char *key(void) -{ - return ASTERISK_GPL_KEY; -} - static int pgsql_reconnect(const char *database) { char my_database[50]; @@ -799,4 +786,9 @@ static int realtime_pgsql_status(int fd, int argc, char **argv) } } -STD_MOD(MOD_0, reload, NULL, NULL); +/* needs usecount semantics defined */ +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "PostgreSQL RealTime Configuration Driver", + .load = load_module, + .unload = unload_module, + .reload = reload + ); |