summaryrefslogtreecommitdiff
path: root/apps/app_curl.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2005-10-18 22:52:21 +0000
committerRussell Bryant <russell@russellbryant.com>2005-10-18 22:52:21 +0000
commit29829640bf10b2d517c1aed12cc31deb5897285c (patch)
tree20630ce6a7b373291da39670c360ee680603aed4 /apps/app_curl.c
parent907fd55883aefce1a753e9910bacf845bb6ff71f (diff)
it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_curl.c')
-rwxr-xr-xapps/app_curl.c21
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)