diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 22:52:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 22:52:21 +0000 |
commit | 2c83f05ebb3060c268c396b5c5fe6a6f7f20a638 (patch) | |
tree | 20630ce6a7b373291da39670c360ee680603aed4 /apps/app_curl.c | |
parent | 01ddee76b0828acb3407d556191b7ca60fb73fea (diff) |
it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6828 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_curl.c')
-rwxr-xr-x | apps/app_curl.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/app_curl.c b/apps/app_curl.c index d69d3626c..e146585bc 100755 --- a/apps/app_curl.c +++ b/apps/app_curl.c @@ -204,22 +204,31 @@ struct ast_custom_function acf_curl = { .synopsis = "Retrieves the contents of a URL", .syntax = "CURL(url[|post-data])", .desc = -" url - URL to retrieve\n" -" post-data - Optional data to send as a POST (GET is default action)\n", + " url - URL to retrieve\n" + " post-data - Optional data to send as a POST (GET is default action)\n", .read = acf_curl_exec, }; int unload_module(void) { + int res; + + res = ast_custom_function_unregister(&acf_curl); + res |= ast_unregister_application(app); + STANDARD_HANGUP_LOCALUSERS; - ast_custom_function_unregister(&acf_curl); - return ast_unregister_application(app); + + return res; } int load_module(void) { - ast_custom_function_register(&acf_curl); - return ast_register_application(app, curl_exec, synopsis, descrip); + int res; + + res = ast_custom_function_register(&acf_curl); + res |= ast_register_application(app, curl_exec, synopsis, descrip); + + return res; } char *description(void) |