]> 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 e0ac9b5ccd50186756a3b469b910d2ce130c2c55..a3554064094845fa9f48304eb6372e4edf1440ed 100644 (file)
@@ -11,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. */
@@ -242,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);