]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/getputfile.c
Merge changes from CUPS 1.4svn-r7366.
[thirdparty/cups.git] / cups / getputfile.c
index 1694f498a51ce4e5c144ee0569ca9ddb31f88949..6af7b56b141572fd825c5fed9d5450853fa984ff 100644 (file)
@@ -78,7 +78,8 @@ cupsGetFd(http_t     *http,           /* I - Connection to server or @code CUPS_HTTP_DEFA
   }
 
   if (!http)
-    http = _cupsConnect();
+    if ((http = _cupsConnect()) == NULL)
+      return (HTTP_SERVICE_UNAVAILABLE);
 
  /*
   * Then send GET requests to the HTTP server...
@@ -285,7 +286,8 @@ cupsPutFd(http_t     *http,         /* I - Connection to server or @code CUPS_HTTP_DEFA
   }
 
   if (!http)
-    http = _cupsConnect();
+    if ((http = _cupsConnect()) == NULL)
+      return (HTTP_SERVICE_UNAVAILABLE);
 
  /*
   * Then send PUT requests to the HTTP server...