]> git.pld-linux.org Git - packages/cups.git/blob - cups-auth.patch
- rel 4
[packages/cups.git] / cups-auth.patch
1 diff -ur cups-1.5.0/cups/auth.c cups-1.5.0-auth/cups/auth.c
2 --- cups-1.5.0/cups/auth.c      2011-05-20 20:22:33.000000000 +0200
3 +++ cups-1.5.0-auth/cups/auth.c 2011-08-05 19:39:19.587496832 +0200
4 @@ -276,8 +278,7 @@
5    {
6      DEBUG_printf(("1cupsDoAuthentication: Unknown auth type: \"%s\"",
7                    http->fields[HTTP_FIELD_WWW_AUTHENTICATE]));
8 -    http->status = HTTP_AUTHORIZATION_CANCELED;
9 -    return (-1);
10 +    return (1);
11    }
12  
13    DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\"", http->authstring));
14 diff -ur cups-1.5.0/cups/request.c cups-1.5.0-auth/cups/request.c
15 --- cups-1.5.0/cups/request.c   2011-05-20 05:49:49.000000000 +0200
16 +++ cups-1.5.0-auth/cups/request.c      2011-08-05 19:40:37.981496819 +0200
17 @@ -396,7 +396,7 @@
18    {
19      status = httpUpdate(http);
20    }
21 -  while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
22 +  while (http->state == HTTP_POST_RECV);
23  
24    DEBUG_printf(("2cupsGetResponse: status=%d", status));
25  
26 @@ -448,7 +449,7 @@
27  
28        DEBUG_puts("2cupsGetResponse: Need authorization...");
29  
30 -      if (!cupsDoAuthentication(http, "POST", resource))
31 +      if (cupsDoAuthentication(http, "POST", resource) >= 0)
32          httpReconnect(http);
33        else
34          status = HTTP_AUTHORIZATION_CANCELED;
35 @@ -780,7 +781,7 @@
36            return (status);
37  
38        case HTTP_UNAUTHORIZED :
39 -          if (cupsDoAuthentication(http, "POST", resource))
40 +          if (cupsDoAuthentication(http, "POST", resource) < 0)
41             return (HTTP_AUTHORIZATION_CANCELED);
42  
43           if (httpReconnect(http))
This page took 0.059186 seconds and 3 git commands to generate.