]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6470
authorBrian West <brian@freeswitch.org>
Fri, 25 Apr 2014 16:50:06 +0000 (11:50 -0500)
committerBrian West <brian@freeswitch.org>
Fri, 25 Apr 2014 16:50:06 +0000 (11:50 -0500)
src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

index 9dea78a203dcb9b6dc4078d756d534a0d4bd36bb..c91aacf97ffd5675ded584f7a99f9ff7c03a8878 100644 (file)
@@ -142,6 +142,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
 {
        char filename[512] = "";
        switch_CURL *curl_handle = NULL;
+       switch_CURLcode cc;
        struct config_data config_data;
        switch_xml_t xml = NULL;
        char *data = NULL;
@@ -288,6 +289,11 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
                        curl_easy_setopt(curl_handle, CURLOPT_INTERFACE, binding->bind_local);
                }
 
+               cc = switch_curl_easy_perform(curl_handle);
+               if (cc && cc != CURLE_WRITE_ERROR) {
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "CURL returned error:[%d] %s\n", cc, switch_curl_easy_strerror(cc));
+               }
+
                switch_curl_easy_perform(curl_handle);
                switch_curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &httpRes);
                switch_curl_easy_cleanup(curl_handle);