aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-21 02:11:39 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-21 02:11:39 +0000
commit8b0c007ad990aa27d9868da49215fd1076ac77cc (patch)
tree270b9c46c1e644483d6d2a35b509f43218ba3252 /pbx/pbx_dundi.c
parenta42edc84034f91932a3e12d503e07f76a6eb498a (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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 20b7844cd..190779c7c 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -2722,8 +2722,6 @@ static struct ast_cli_entry cli_precache =
static struct ast_cli_entry cli_queryeid =
{ { "dundi", "query", NULL }, dundi_do_query, "Query a DUNDi EID", query_usage };
-LOCAL_USER_DECL;
-
static struct dundi_transaction *create_transaction(struct dundi_peer *p)
{
struct dundi_transaction *trans;
@@ -3713,7 +3711,7 @@ static int dundifunc_read(struct ast_channel *chan, char *cmd, char *num, char *
int results;
int x;
int bypass = 0;
- struct localuser *u;
+ struct ast_module_user *u;
struct dundi_result dr[MAX_RESULTS];
buf[0] = '\0';
@@ -3723,7 +3721,7 @@ static int dundifunc_read(struct ast_channel *chan, char *cmd, char *num, char *
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
context = strchr(num, '|');
if (context) {
@@ -3750,7 +3748,7 @@ static int dundifunc_read(struct ast_channel *chan, char *cmd, char *num, char *
}
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -4436,9 +4434,9 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
return 0;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
ast_cli_unregister(&cli_debug);
ast_cli_unregister(&cli_store_history);
@@ -4462,19 +4460,18 @@ static int unload_module(void *mod)
return 0;
}
-static int reload(void *mod)
+static int reload(void)
{
struct sockaddr_in sin;
set_config("dundi.conf",&sin);
return 0;
}
-static int load_module(void *mod)
+static int load_module(void)
{
int res = 0;
struct sockaddr_in sin;
- __mod_desc = mod;
dundi_set_output(dundi_debug_output);
dundi_set_error(dundi_error_output);
@@ -4542,15 +4539,9 @@ static int load_module(void *mod)
return res;
}
-static const char *description(void)
-{
- return "Distributed Universal Number Discovery (DUNDi)";
-}
-
-static const char *key(void)
-{
- return ASTERISK_GPL_KEY;
-}
-
-STD_MOD(MOD_1 | NO_USECOUNT | NO_UNLOAD, reload, NULL, NULL);
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Distributed Universal Number Discovery (DUNDi)",
+ .load = load_module,
+ .unload = unload_module,
+ .reload = reload,
+ );