From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AB5C349EB6 for ; Mon, 15 Apr 2024 16:28:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EEE4168CF80; Mon, 15 Apr 2024 19:28:12 +0300 (EEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 86FE268CD49 for ; Mon, 15 Apr 2024 19:28:04 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4182353a15cso12115415e9.1 for ; Mon, 15 Apr 2024 09:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713198483; x=1713803283; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FhwQ9WqRnnPsqwZ/jKhnCQBxcORgCmjmOPvABXYH89w=; b=SPvjDs+wddSHu+L+ZUGg4dJanxl1qZNY3azyzm8BS4sEZRyISV0G/q+Qt6cek3CRdA ygvhZZCYghA9YGf67+zI+RA9FB8CxZdhZBsXlH7QFlYk/Id46wNqD9Gj478rgCHTHd4R FWeypFN1fV+GOPkdAQ1QM/3Ss0vaViP0uiJXMZl85Zc27PQvOq7ZpOWGvzP4+ButkRPS oQz7nhl7pBA912JMDfsaSCjN74M+TsN6juVYYPHK4k7F+oeVt9Tr2iR+VPEEvfVxoXQt I3uiL82K/cBI1L4EQd9D6RwMqSvBm04DOt7HTgJbYuQf7BWJm6wdevofaQnub9wWk2F9 kKvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713198483; x=1713803283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FhwQ9WqRnnPsqwZ/jKhnCQBxcORgCmjmOPvABXYH89w=; b=teUEAKnRrSC5VoaqWkjHpHa//Rqh8GvpjHKu1O2ue8DV24RQ3RyoMcMT7HPK15BfBI dfR+OCLABpt2E85nQuCBlWCjSAXmVhfd436vxmQsJ1o+Az4Ct1Jtr++uUPX0GdF+CCzU sAN+z3Kkk4sWxnRLKZ99QFp2B8tCigoNj4PY2GcAYzyfpyXUM6vgdAZKBD8ZZ3flhSdr +PPdai+eGOq4QtulpJMGku0zMWyBpJ5hTau3+VCAcfyKxX4tiVrFu9wh66AlX5uaCfro l6bIFbiSTykcyIw0JPc6Q0AD2L6D8FMNPSdbgzDYrCx/OkTsaP7PLfgTC/lrTmLcQHQZ Nwfg== X-Gm-Message-State: AOJu0YzuZ/YII5TDRcpalBJYYLpXu8sAWWjyXLsKVUTadk4vBosYmLfD l2ehBzAY488H6FUhJVQ5Ru3uMmi05nXdOnp1+DBR7rvPcFEQsO/vcctsXA== X-Google-Smtp-Source: AGHT+IHsXDReVtSWHbvYJ5oC1gwVcPqbwdd92VjM/vub7N4pbT55800i/BldFSx/EB7ArTcrIjW6kQ== X-Received: by 2002:a05:6000:4c:b0:33d:d7be:3bec with SMTP id k12-20020a056000004c00b0033dd7be3becmr8114318wrx.58.1713198483181; Mon, 15 Apr 2024 09:28:03 -0700 (PDT) Received: from localhost.localdomain (33bf3d9d.skybroadband.com. [51.191.61.157]) by smtp.gmail.com with ESMTPSA id u8-20020a5d4348000000b00347c187a3a0sm3899969wrr.24.2024.04.15.09.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:28:02 -0700 (PDT) From: Derek Buitenhuis To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Apr 2024 17:27:40 +0100 Message-ID: <20240415162741.110374-6-derek.buitenhuis@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240415162741.110374-1-derek.buitenhuis@gmail.com> References: <20240415162741.110374-1-derek.buitenhuis@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] avformat/http: Rename attempts to auth_attempts X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This accurately reflects what it does, as per e75bbcf493aeb549d04c56f49406aeee3950d93b. Signed-off-by: Derek Buitenhuis --- libavformat/http.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 8f092f108d..ce1af5f976 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -359,7 +359,7 @@ static int http_open_cnx(URLContext *h, AVDictionary **options) { HTTPAuthType cur_auth_type, cur_proxy_auth_type; HTTPContext *s = h->priv_data; - int ret, attempts = 0, redirects = 0; + int ret, auth_attempts = 0, redirects = 0; int reconnect_delay = 0; uint64_t off; char *cached; @@ -409,10 +409,10 @@ redo: goto redo; } - attempts++; + auth_attempts++; if (s->http_code == 401) { if ((cur_auth_type == HTTP_AUTH_NONE || s->auth_state.stale) && - s->auth_state.auth_type != HTTP_AUTH_NONE && attempts < 4) { + s->auth_state.auth_type != HTTP_AUTH_NONE && auth_attempts < 4) { ffurl_closep(&s->hd); goto redo; } else @@ -420,7 +420,7 @@ redo: } if (s->http_code == 407) { if ((cur_proxy_auth_type == HTTP_AUTH_NONE || s->proxy_auth_state.stale) && - s->proxy_auth_state.auth_type != HTTP_AUTH_NONE && attempts < 4) { + s->proxy_auth_state.auth_type != HTTP_AUTH_NONE && auth_attempts < 4) { ffurl_closep(&s->hd); goto redo; } else @@ -449,7 +449,7 @@ redo: /* Restart the authentication process with the new target, which * might use a different auth mechanism. */ memset(&s->auth_state, 0, sizeof(s->auth_state)); - attempts = 0; + auth_attempts = 0; goto redo; } return 0; @@ -2082,7 +2082,7 @@ static int http_proxy_open(URLContext *h, const char *uri, int flags) char hostname[1024], hoststr[1024]; char auth[1024], pathbuf[1024], *path; char lower_url[100]; - int port, ret = 0, attempts = 0; + int port, ret = 0, auth_attempts = 0; HTTPAuthType cur_auth_type; char *authstr; @@ -2142,10 +2142,10 @@ redo: if (ret < 0) goto fail; - attempts++; + auth_attempts++; if (s->http_code == 407 && (cur_auth_type == HTTP_AUTH_NONE || s->proxy_auth_state.stale) && - s->proxy_auth_state.auth_type != HTTP_AUTH_NONE && attempts < 2) { + s->proxy_auth_state.auth_type != HTTP_AUTH_NONE && auth_attempts < 2) { ffurl_closep(&s->hd); goto redo; } -- 2.43.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".