Sophie

Sophie

distrib > Mandriva > current > i586 > by-pkgid > 9f7f44e6fadcc0c39eddf3fee1eae7be > files > 13

cups-1.4.3-3.2mdv2010.2.src.rpm

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)