diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-21 02:11:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-21 02:11:39 +0000 |
commit | 8b0c007ad990aa27d9868da49215fd1076ac77cc (patch) | |
tree | 270b9c46c1e644483d6d2a35b509f43218ba3252 /funcs/func_enum.c | |
parent | a42edc84034f91932a3e12d503e07f76a6eb498a (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 'funcs/func_enum.c')
-rw-r--r-- | funcs/func_enum.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/funcs/func_enum.c b/funcs/func_enum.c index 94610d304..f37a15fd1 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -50,8 +50,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") static char *synopsis = "Syntax: ENUMLOOKUP(number[|Method-type[|options[|record#[|zone-suffix]]]])\n"; -LOCAL_USER_DECL; - static int function_enum(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) { @@ -65,7 +63,7 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data, int res = 0; char tech[80]; char dest[256] = "", tmp[2] = "", num[AST_MAX_EXTENSION] = ""; - struct localuser *u; + struct ast_module_user *u; char *s, *p; buf[0] = '\0'; @@ -82,7 +80,7 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data, return -1; } - LOCAL_USER_ADD(u); + u = ast_module_user_add(chan); ast_copy_string(tech, args.tech ? args.tech : "sip", sizeof(tech)); @@ -110,7 +108,7 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data, else ast_copy_string(buf, dest, len); - LOCAL_USER_REMOVE(u); + ast_module_user_remove(u); return 0; } @@ -137,7 +135,7 @@ static int function_txtcidname(struct ast_channel *chan, char *cmd, char tech[80]; char txt[256] = ""; char dest[80]; - struct localuser *u; + struct ast_module_user *u; buf[0] = '\0'; @@ -147,7 +145,7 @@ static int function_txtcidname(struct ast_channel *chan, char *cmd, return -1; } - LOCAL_USER_ADD(u); + u = ast_module_user_add(chan); res = ast_get_txt(chan, data, dest, sizeof(dest), tech, sizeof(tech), txt, sizeof(txt)); @@ -155,7 +153,7 @@ static int function_txtcidname(struct ast_channel *chan, char *cmd, if (!ast_strlen_zero(txt)) ast_copy_string(buf, txt, len); - LOCAL_USER_REMOVE(u); + ast_module_user_remove(u); return 0; } @@ -171,21 +169,19 @@ static struct ast_custom_function txtcidname_function = { .read = function_txtcidname, }; -static char *tdesc = "ENUM related dialplan functions"; - -static int unload_module(void *mod) +static int unload_module(void) { int res = 0; res |= ast_custom_function_unregister(&enum_function); res |= ast_custom_function_unregister(&txtcidname_function); - STANDARD_HANGUP_LOCALUSERS; + ast_module_user_hangup_all(); return res; } -static int load_module(void *mod) +static int load_module(void) { int res = 0; @@ -195,15 +191,4 @@ static int load_module(void *mod) return res; } -static const char *description(void) -{ - return tdesc; -} - - -static const char *key(void) -{ - return ASTERISK_GPL_KEY; -} - -STD_MOD(MOD_1, NULL, NULL, NULL); +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "ENUM related dialplan functions"); |