mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Bugfix for old versions of libcurl (#3982)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||||
|
#ifdef CURLOPT_WRITEDATA
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
|
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");
|
curl_easy_setopt(curl, CURLOPT_USERAGENT, "asterisk-libcurl-agent/1.0");
|
||||||
|
|
||||||
if (post_data) {
|
if (post_data) {
|
||||||
|
Reference in New Issue
Block a user