X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fopenid%2Fserv_openid_rp.c;h=9bee4e6d209c6e4a15c60c24573562b2eaac0764;hp=39af689e475a8396cd1114d71e9cee2ae59bf881;hb=38fb3b9d22525b73cf6aed061ff133390eed2739;hpb=0a257dd97090f7225489c72005cacea63aa00c92 diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 39af689e4..9bee4e6d2 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -589,7 +589,7 @@ int fetch_http(StrBuf *url, StrBuf **target_buf) { StrBuf *ReplyBuf; CURL *curl; - CURLcode res; + CURLcode result; char *effective_url = NULL; char errmsg[1024] = ""; @@ -598,18 +598,15 @@ int fetch_http(StrBuf *url, StrBuf **target_buf) if (ReplyBuf == 0) return(-1); curl = ctdl_openid_curl_easy_init(errmsg); - if (!curl) { - syslog(LOG_ALERT, "Unable to initialize libcurl."); - return(-1); - } + if (!curl) return(-1); curl_easy_setopt(curl, CURLOPT_URL, ChrPtr(url)); curl_easy_setopt(curl, CURLOPT_WRITEDATA, ReplyBuf); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlFillStrBuf_callback); - res = curl_easy_perform(curl); - if (res) { - syslog(LOG_DEBUG, "libcurl error %d: %s", res, errmsg); + result = curl_easy_perform(curl); + if (result) { + syslog(LOG_DEBUG, "libcurl error %d: %s", result, errmsg); } curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url); StrBufPlain(url, effective_url, -1);