]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror fix from trunk.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 8 May 2014 23:01:48 +0000 (23:01 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 8 May 2014 23:01:48 +0000 (23:01 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11862 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
cups/request.c

index afe3a78cfe8927d5d5e94f67badb4451ad1187d3..8aa5370665c34f25625f9359285f2a940e8e5446 100644 (file)
@@ -1,10 +1,14 @@
-CHANGES.txt - 1.7.3 - 2014-04-24
+CHANGES.txt - 1.7.3 - 2014-05-08
 --------------------------------
 
 CHANGES IN CUPS V1.7.3
 
        - Fixed mapping of OutputBin values such as "Tray1"
          (<rdar://problem/16685606>)
+       - Several ippGet* functions incorrectly returned -1 instead of 0 on
+         error.
+       - The cupsGetResponse function did not work properly with
+         CUPS_HTTP_DEFAULT (<rdar://problem/16762593>)
 
 
 CHANGES IN CUPS V1.7.2
index 0152620564eb85d5e1674c23356928561270ae7a..df96b81e25d4d67baf510255f1f5402a19e1ab25 100644 (file)
@@ -350,17 +350,31 @@ cupsGetResponse(http_t     *http, /* I - Connection to server or @code CUPS_HTTP
 
 
   DEBUG_printf(("cupsGetResponse(http=%p, resource=\"%s\")", http, resource));
+  DEBUG_printf(("1cupsGetResponse: http->state=%d", http ? http->state : HTTP_STATE_ERROR));
 
  /*
   * Connect to the default server as needed...
   */
 
   if (!http)
-    http = _cupsConnect();
+  {
+    _cups_globals_t *cg = _cupsGlobals();
+                                       /* Pointer to library globals */
 
-  if (!http || (http->state != HTTP_STATE_POST_RECV &&
-                http->state != HTTP_STATE_POST_SEND))
+    if ((http = cg->http) == NULL)
+    {
+      _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No active connection."), 1);
+      DEBUG_puts("1cupsGetResponse: No active connection - returning NULL.");
+      return (NULL);
+    }
+  }
+
+  if (http->state != HTTP_STATE_POST_RECV && http->state != HTTP_STATE_POST_SEND)
+  {
+    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No request sent."), 1);
+    DEBUG_puts("1cupsGetResponse: Not in POST state - returning NULL.");
     return (NULL);
+  }
 
  /*
   * Check for an unfinished chunked request...