Index: cups/auth.c =================================================================== --- cups/auth.c (revision 9019) +++ cups/auth.c (revision 9020) @@ -181,6 +181,15 @@ else if (http->status == HTTP_UNAUTHORIZED) http->digest_tries ++; + if (http->status == HTTP_UNAUTHORIZED && http->digest_tries >= 3) + { + DEBUG_printf(("1cupsDoAuthentication: Too many authentication tries (%d)", + http->digest_tries)); + + http->status = HTTP_AUTHORIZATION_CANCELED; + return (-1); + } + /* * Got a password; encode it for the server... */ @@ -222,15 +231,6 @@ } # endif /* __APPLE__ */ - if (http->status == HTTP_UNAUTHORIZED && http->digest_tries >= 3) - { - DEBUG_printf(("1cupsDoAuthentication: too many Negotiate tries (%d)", - http->digest_tries)); - http->status = HTTP_AUTHORIZATION_CANCELED; - - return (-1); - } - if (http->gssname == GSS_C_NO_NAME) { if ((gss_service_name = getenv("CUPS_GSSSERVICENAME")) == NULL)