From: raster Date: Tue, 11 May 2010 12:10:29 +0000 (+0000) Subject: only do auth stuff if there in curl. X-Git-Tag: build/2012-07-04.173327~2081 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=909274fbca406a1c67ba35327a61bb4f9ab7df68;p=profile%2Fivi%2Fecore.git only do auth stuff if there in curl. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@48749 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index c3ee928..96b151b 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -688,17 +688,22 @@ ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, const char *username, const c ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_httpauth_set"); return 0; } +# ifdef CURLOPT_USERNAME +# ifdef CURLOPT_PASSWORD if ((username != NULL) && (password != NULL)) { if (safe) - curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE); + curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE); else - curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANY); + curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_easy_setopt(url_con->curl_easy, CURLOPT_USERNAME, username); curl_easy_setopt(url_con->curl_easy, CURLOPT_PASSWORD, password); + return 1; } - return 0; +# endif +# endif #endif + return 0; } /**