* libcurl operations now timeout after 180 seconds instead of hanging the calling...
authorArt Cancro <ajc@citadel.org>
Sun, 4 Jan 2009 02:38:03 +0000 (02:38 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 4 Jan 2009 02:38:03 +0000 (02:38 +0000)
citadel/modules/openid/serv_openid_rp.c
citadel/modules/rssclient/serv_rssclient.c

index c911bda9b626aa005797b9e12b4b0082cac277a0..7b6329211439d6caf6f563dd213ca7fb8d69a8de 100644 (file)
@@ -541,6 +541,7 @@ int fetch_http(char *url, char *target_buf, int maxbytes, int normalize_len)
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+       curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {
                curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
        }
@@ -756,6 +757,7 @@ void cmd_oidf(char *argbuf) {
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+       curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {
                curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
        }
index ef85d2cdf4d97a77253f218a552c48fb8f63f79f..3877cf9ed13cb8fd66066852f8e3928fe460176a 100644 (file)
@@ -400,6 +400,7 @@ void rss_do_fetching(char *url, char *rooms) {
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+       curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {
                curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
        }