]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Revert merge of pull request #245
authorTill Kamppeter <till.kamppeter@gmail.com>
Sat, 20 Jun 2020 12:10:58 +0000 (14:10 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Sat, 20 Jun 2020 12:10:58 +0000 (14:10 +0200)
This reverts commit bbe4aa2e85bfc3bfc02a7a0544985a7704cf1253, reversing
changes made to b78fd1ba78f1e0d3505e585f742edddbaa67b55c.

utils/cups-browsed.c

index bfb329360e91597f6149453cb5fafa71815a15b7..d6d78e90e9fd887746f3e709d196e6a0b3d48f5a 100644 (file)
@@ -7807,36 +7807,7 @@ gboolean update_cups_queues(gpointer unused) {
 #ifdef HAVE_CUPS_1_6
       /* Check whether there is a temporary CUPS queue which we would
          overwrite */
-      dest = NULL;
-      ipp_t *response =  NULL;
-      const char const *pattrs[] =
-                {
-                  "printer-name"
-                };
-
-      const char const *req_attrs[] =
-                {
-                  "printer-name"
-                };
-
-      if ((response = 
-           get_printer_attributes2(http, uri, 
-                       pattrs, 1, req_attrs, 1, 0)) == NULL) {
-        debug_printf ("No CUPS queue with URI %s found\n", uri);
-      }
-      else {
-        attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME);
-        if(!strcmp(ippGetString(attr, 0, NULL), p->queue_name)){
-          dest = cupsGetNamedDest(http, p->queue_name, NULL);
-          debug_printf ("CUPS queue %s with URI %s found", p->queue_name, uri);
-        }
-        else {
-          debug_printf ("CUPS queue with URI %s found, but with \"printer-name\" %s", uri, ippGetString(attr, 0, NULL));
-        }
-
-        ippDelete(response);
-      }
-
+      dest = cupsGetNamedDest(http, p->queue_name, NULL);
       if (dest) {
        /* CUPS has found a queue with this name.
           Either CUPS generates a temporary queue here or we have already