]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_xml_curl: Compile issues of missing define for older version
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Tue, 16 Mar 2010 09:28:53 +0000 (09:28 +0000)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Tue, 16 Mar 2010 09:28:53 +0000 (09:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17001 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

index 10de9ab2472a92a8b2aa677a2756575f9b95223e..453114e583afd0377afb548a60f91701e5094032 100644 (file)
@@ -242,8 +242,12 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
                }
 
                if (binding->timeout_ms) {
+#ifdef CURLOPT_TIMEOUT_MS
                        curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT_MS, binding->timeout_ms);
-                        curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
+#else
+                       curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, binding->timeout_ms);
+#endif
+                       curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
                }
 
                if (binding->disable100continue) {