git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
To: git@vger.kernel.org
Cc: peff@peff.net, sam@vilain.net
Subject: [PATCH v4 5/5] http: rename HTTP_REAUTH to HTTP_RETRY
Date: Mon, 12 Mar 2012 18:30:00 +0100	[thread overview]
Message-ID: <4F5E3298.5030502@seap.minhap.es> (raw)

After adding the proxy authentication support in
http, the semantics of HTTP_REAUTH changed more to
a retry rather than a re-authentication, so we
rename it to HTTP_RETRY.

Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
---
 http.c |    6 +++---
 http.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/http.c b/http.c
index 9b98179..4aa5a46 100644
--- a/http.c
+++ b/http.c
@@ -823,7 +823,7 @@ static int http_request(const char *url, void *result, int target, int options)
 			} else {
 				credential_fill(&http_auth);
 				init_curl_http_auth(slot->curl);
-				ret = HTTP_REAUTH;
+				ret = HTTP_RETRY;
 			}
 		} else if (results.http_code == 407) { /* Proxy authentication failure */
 			if (proxy_auth.username && proxy_auth.password) {
@@ -832,7 +832,7 @@ static int http_request(const char *url, void *result, int target, int options)
 			} else {
 				credential_fill(&proxy_auth);
 				set_proxy_auth(slot->curl);
-				ret = HTTP_REAUTH;
+				ret = HTTP_RETRY;
 			}
 		} else {
 			if (!curl_errorstr[0])
@@ -862,7 +862,7 @@ static int http_request_reauth(const char *url, void *result, int target,
 
 	do {
 		ret = http_request(url, result, target, options);
-	} while (ret == HTTP_REAUTH);
+	} while (ret == HTTP_RETRY);
 
 	return ret;
 }
diff --git a/http.h b/http.h
index 0b61653..6499397 100644
--- a/http.h
+++ b/http.h
@@ -123,7 +123,7 @@ extern char *get_remote_object_url(const char *url, const char *hex,
 #define HTTP_MISSING_TARGET	1
 #define HTTP_ERROR		2
 #define HTTP_START_FAILED	3
-#define HTTP_REAUTH	4
+#define HTTP_RETRY	4
 #define HTTP_NOAUTH	5
 
 /*
-- 
1.7.7.6

             reply	other threads:[~2012-03-12 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 17:30 Nelson Benitez Leon [this message]
2012-03-12 20:06 ` [PATCH v4 5/5] http: rename HTTP_REAUTH to HTTP_RETRY Junio C Hamano
2012-03-13 12:47   ` Nelson Benitez Leon
2012-03-13 17:51     ` Junio C Hamano
2012-03-13 22:04       ` Jeff King
2012-03-13 23:05         ` Junio C Hamano
2012-03-14 11:11           ` Nelson Benitez Leon
2012-03-14 18:19             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F5E3298.5030502@seap.minhap.es \
    --to=nelsonjesus.benitez@seap.minhap.es \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sam@vilain.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).