Changeset 10582


Ignore:
Timestamp:
May 1, 2010, 4:36:01 AM (11 years ago)
Author:
charles
Message:

(1.9x daemon) backport r10431 for #3070 "--blocklist-update timeout"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.9x/daemon/remote.c

    r10288 r10582  
    18411841    curl_easy_setopt( curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL );
    18421842    curl_easy_setopt( curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
    1843     curl_easy_setopt( curl, CURLOPT_TIMEOUT, 60L );
    18441843    curl_easy_setopt( curl, CURLOPT_VERBOSE, debug );
    18451844    curl_easy_setopt( curl, CURLOPT_ENCODING, "" ); /* "" tells curl to fill in the blanks with what it was compiled to support */
     
    18571856}
    18581857
     1858static long
     1859getTimeoutSecs( const char * req )
     1860{
     1861    if( strstr( req, "\"method\":\"blocklist-update\"" ) != NULL )
     1862        return 300L;
     1863
     1864    return 60L; /* default value */
     1865}
    18591866
    18601867static int
     
    18821889
    18831890        curl_easy_setopt( curl, CURLOPT_POSTFIELDS, reqs[i] );
     1891        curl_easy_setopt( curl, CURLOPT_TIMEOUT, getTimeoutSecs( reqs[i] ) );
    18841892
    18851893        if( debug )
Note: See TracChangeset for help on using the changeset viewer.