diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-11 03:14:05 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-11 03:14:05 +0000 |
commit | 5f90b9bebddfa06f9d08b63e9c48830071480f38 (patch) | |
tree | 47f92d29e3216d69801be7bdb5d15fef7aab9a4d /funcs/func_enum.c | |
parent | 7acc893dad48c008eaced05bfbedb0d17735bc47 (diff) |
build function modules independently (no more pbx_functions.so)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9469 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_enum.c')
-rw-r--r-- | funcs/func_enum.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/funcs/func_enum.c b/funcs/func_enum.c index 65b22db84..8a063bee7 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -34,9 +34,9 @@ #include "asterisk.h" -#ifndef BUILTIN_FUNC +ASTERISK_FILE_VERSION(__FILE__, "$Revision$") + #include "asterisk/module.h" -#endif /* BUILTIN_FUNC */ #include "asterisk/channel.h" #include "asterisk/pbx.h" #include "asterisk/utils.h" @@ -145,10 +145,7 @@ static char *function_enum(struct ast_channel *chan, char *cmd, char *data, char return buf; } -#ifndef BUILTIN_FUNC -static -#endif -struct ast_custom_function enum_function = { +static struct ast_custom_function enum_function = { .name = "ENUMLOOKUP", .synopsis = "ENUMLOOKUP allows for general or specific querying of NAPTR records" " or counts of NAPTR types for ENUM or ENUM-like DNS pointers", @@ -188,10 +185,7 @@ static char *function_txtcidname(struct ast_channel *chan, char *cmd, char *data return buf; } -#ifndef BUILTIN_FUNC -static -#endif -struct ast_custom_function txtcidname_function = { +static struct ast_custom_function txtcidname_function = { .name = "TXTCIDNAME", .synopsis = "TXTCIDNAME looks up a caller name via DNS", .syntax = "TXTCIDNAME(<number>)", @@ -201,27 +195,26 @@ struct ast_custom_function txtcidname_function = { .read = function_txtcidname, }; -#ifndef BUILTIN_FUNC - -static char *tdesc = "ENUM Related Functions"; +static char *tdesc = "ENUM related dialplan functions"; int unload_module(void) { - ast_custom_function_unregister(&enum_function); - ast_custom_function_unregister(&txtcidname_function); + int res = 0; + + res |= ast_custom_function_unregister(&enum_function); + res |= ast_custom_function_unregister(&txtcidname_function); STANDARD_HANGUP_LOCALUSERS; - return 0; + return res; } int load_module(void) { - int res; + int res = 0; - res = ast_custom_function_register(&enum_function); - if (!res) - ast_custom_function_register(&txtcidname_function); + res |= ast_custom_function_register(&enum_function); + res |= ast_custom_function_register(&txtcidname_function); return res; } @@ -244,5 +237,4 @@ char *key() { return ASTERISK_GPL_KEY; } -#endif /* BUILTIN_FUNC */ |