From: hno <> Date: Sun, 10 Aug 2003 13:27:34 +0000 (+0000) Subject: Fixing abuse of struct in_addr in auth_digest authenticate to X-Git-Tag: SQUID_3_0_PRE3~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3edaed62f136edd255f3700dc7b5e52cf0e41c7;p=thirdparty%2Fsquid.git Fixing abuse of struct in_addr in auth_digest authenticate to allow building on MinGW again.. (reported by Guido) --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index bdaac0409f..4d01086521 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: auth_digest.cc,v 1.29 2003/08/07 13:35:04 robertc Exp $ + * $Id: auth_digest.cc,v 1.30 2003/08/10 07:27:34 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -711,7 +711,13 @@ digest_request_h::authenticate(request_t * request, ConnStateData::Pointer conn, } else { const char *useragent = httpHeaderGetStr(&request->header, HDR_USER_AGENT); - static struct in_addr last_broken_addr = {0}; + static struct in_addr last_broken_addr; + static int seen_broken_client = 0; + + if (!seen_broken_client) { + last_broken_addr = no_addr; + seen_broken_client = 1; + } if (memcmp(&last_broken_addr, &request->client_addr, sizeof(last_broken_addr)) != 0) { debug(29, 1) ("\nDigest POST bug detected from %s using '%s'. Please upgrade browser. See Bug #630 for details.\n", inet_ntoa(request->client_addr), useragent ? useragent : "-");