]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
try to do something like what the user asked for if we don't support ms timeout
authorMichael Jerris <mike@jerris.com>
Tue, 16 Mar 2010 13:45:06 +0000 (13:45 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 16 Mar 2010 13:45:06 +0000 (13:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17002 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

index 453114e583afd0377afb548a60f91701e5094032..15ad1f069af120d4dfffb2f57a2690ece4c8dc1c 100644 (file)
@@ -245,7 +245,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
 #ifdef CURLOPT_TIMEOUT_MS
                        curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT_MS, binding->timeout_ms);
 #else
-                       curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, binding->timeout_ms);
+                       curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, (binding->timeout_ms / 1000) ? (binding->timeout_ms / 1000) : 1);
 #endif
                        curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
                }