]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/getdevices.c
Return kDNSServiceErr_ServiceNotRunning when Bonjour for Windows not installed.
[thirdparty/cups.git] / cups / getdevices.c
index 13bebd2fff33e3d599f8adbe525fa12d8d32026a..a3554064094845fa9f48304eb6372e4edf1440ed 100644 (file)
@@ -3,13 +3,7 @@
  *
  * Copyright 2008-2016 by Apple Inc.
  *
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file.  If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * This file is subject to the Apple OS-Developed Software exception.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
@@ -17,6 +11,7 @@
  */
 
 #include "cups-private.h"
+#include "debug-internal.h"
 #include "adminutil.h"
 
 
  * parameters provide comma-delimited lists of backends to include or omit from
  * the request respectively.
  *
- * @since CUPS 1.4/macOS 10.6@
+ * This function is deprecated with the IPP printer discovery functionality
+ * being provided by the @link cupsEnumDests@ and @cupsGetDests@ functions.
+ *
+ * @deprecated@
  */
 
 ipp_status_t                           /* O - Request status - @code IPP_OK@ on success. */
@@ -248,20 +246,14 @@ cupsGetDevices(
   httpBlocking(http, blocking);
   httpFlush(http);
 
-  if (status == HTTP_STATUS_ERROR)
-    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(http->error), 0);
-  else
-  {
-    attr = ippFindAttribute(response, "status-message", IPP_TAG_TEXT);
+  attr = ippFindAttribute(response, "status-message", IPP_TAG_TEXT);
 
-    DEBUG_printf(("cupsGetDevices: status-code=%s, status-message=\"%s\"",
-                 ippErrorString(response->request.status.status_code),
-                 attr ? attr->values[0].string.text : ""));
+  DEBUG_printf(("cupsGetDevices: status-code=%s, status-message=\"%s\"",
+                ippErrorString(response->request.status.status_code),
+                attr ? attr->values[0].string.text : ""));
 
-    _cupsSetError(response->request.status.status_code,
-                 attr ? attr->values[0].string.text :
-                     ippErrorString(response->request.status.status_code), 0);
-  }
+  _cupsSetError(response->request.status.status_code,
+                attr ? attr->values[0].string.text : ippErrorString(response->request.status.status_code), 0);
 
   ippDelete(response);