aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-07 21:18:14 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-07 21:18:14 +0000
commit6919ba569f86f805193753d4b73229b4afa640f1 (patch)
treeea8d965b71e25f49517139c8e8e27b53afd3a745 /apps
parent83c8ebbbb89285886630a97684da3bff9a4cc71c (diff)
Bugfix for old versions of libcurl (#3982)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5437 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_curl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_curl.c b/apps/app_curl.c
index 558117d08..06d387c54 100755
--- a/apps/app_curl.c
+++ b/apps/app_curl.c
@@ -104,7 +104,11 @@ static int curl_exec(struct ast_channel *chan, void *data)
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+#ifdef CURLOPT_WRITEDATA
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+#else
+ curl_easy_setopt(curl, CURLOPT_WRITEINFO, (void *)&chunk);
+#endif
curl_easy_setopt(curl, CURLOPT_USERAGENT, "asterisk-libcurl-agent/1.0");
if (post_data) {