summaryrefslogtreecommitdiff
path: root/apps/app_curl.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2005-12-07 15:36:55 +0000
committerRussell Bryant <russell@russellbryant.com>2005-12-07 15:36:55 +0000
commitcac0f4d09550c44e570850b1cbf9de9127499b8c (patch)
treee5dc40ad9425950e8cb0338dd3f260705381898a /apps/app_curl.c
parente2f674787bbb280fe9fc67b8a1fe3b46ef848faa (diff)
This is the first round of removing applications that were marked as deprecated
in the 1.2 release. They are being removed from the trunk and will not be in the next major release. The following is a list of the applications that are being removed in this commit: Curl, Cut, Sort, DBPut, DBGet, ENUMLookup, Eval GetGroupCount, SetGroup, CheckGroup, GetGroupMatchCount MD5, MD5Check, Math, SetCIDName, SetCIDNum, SetRDNIS, SetCallerID TXTCIDName, AbsoluteTimeout, DigitTimeout, ResponseTimeout, SetAccount SetLanguage, SetVar (renamed to Set) These changes also include moving the "group show channels" cli command from app_groupcount.c to cli.c. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_curl.c')
-rw-r--r--apps/app_curl.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/apps/app_curl.c b/apps/app_curl.c
index 227bea2dd..02cbd93dc 100644
--- a/apps/app_curl.c
+++ b/apps/app_curl.c
@@ -44,20 +44,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *tdesc = "Load external URL";
-static char *app = "Curl";
-
-static char *synopsis = "Load an external URL";
-
-static char *descrip =
-" Curl(URL[|postdata]): This application will request the specified URL.\n"
-"It is mainly used for signalling external applications of an event.\n"
-"Parameters:\n"
-" URL - This is the external URL to request.\n"
-" postdata - This information will be treated as POST data.\n"
-"This application will set the following variable:\n"
-" CURL - This variable will contain the resulting page.\n"
-"This application has been deprecated in favor of the CURL function.\n";
-
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
@@ -117,57 +103,6 @@ static int curl_internal(struct MemoryStruct *chunk, char *url, char *post)
return 0;
}
-static int curl_exec(struct ast_channel *chan, void *data)
-{
- int res = 0;
- struct localuser *u;
- char *info;
- struct MemoryStruct chunk = { NULL, 0 };
- static int dep_warning = 0;
- AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(url);
- AST_APP_ARG(postdata);
- );
-
- if (!dep_warning) {
- ast_log(LOG_WARNING, "The application Curl is deprecated. Please use the CURL() function instead.\n");
- dep_warning = 1;
- }
-
- if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "Curl requires an argument (URL)\n");
- return -1;
- }
-
- LOCAL_USER_ADD(u);
-
- if ((info = ast_strdupa(data))) {
- AST_STANDARD_APP_ARGS(args, info);
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
- LOCAL_USER_REMOVE(u);
- return -1;
- }
-
- if (! curl_internal(&chunk, args.url, args.postdata)) {
- if (chunk.memory) {
- chunk.memory[chunk.size] = '\0';
- if (chunk.memory[chunk.size - 1] == 10)
- chunk.memory[chunk.size - 1] = '\0';
-
- pbx_builtin_setvar_helper(chan, "CURL", chunk.memory);
-
- free(chunk.memory);
- }
- } else {
- ast_log(LOG_ERROR, "Cannot allocate curl structure\n");
- res = -1;
- }
-
- LOCAL_USER_REMOVE(u);
- return res;
-}
-
static char *acf_curl_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
struct localuser *u;
@@ -228,7 +163,6 @@ int unload_module(void)
int res;
res = ast_custom_function_unregister(&acf_curl);
- res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
@@ -240,7 +174,6 @@ int load_module(void)
int res;
res = ast_custom_function_register(&acf_curl);
- res |= ast_register_application(app, curl_exec, synopsis, descrip);
return res;
}