]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/util.c
Merge changes from CUPS 1.4svn-r7366.
[thirdparty/cups.git] / cups / util.c
index a572e6fa9bdeff11b24651e6838c9dc646bd874d..7c7e4f406f1f00255d589e0e663011c52ec9e761 100644 (file)
@@ -942,7 +942,8 @@ cupsGetPPD3(http_t     *http,               /* I  - HTTP connection or @code CUPS_HTTP_DEFAUL
   */
 
   if (!http)
-    http = _cupsConnect();
+    if ((http = _cupsConnect()) == NULL)
+      return (HTTP_SERVICE_UNAVAILABLE);
 
   if (!cups_get_printer_uri(http, name, hostname, sizeof(hostname), &port,
                             resource, sizeof(resource), 0))