]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Do not set printer-is-shared for remote queue vol. 2 180/head
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 27 Nov 2019 14:03:25 +0000 (15:03 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 27 Nov 2019 14:03:25 +0000 (15:03 +0100)
utils/cups-browsed.c

index 590c6adaae6f4737ae1c4861a6a84f45263423f6..5c5d614283e54c4305bca65a677012cb686ff3ef 100644 (file)
@@ -7754,7 +7754,20 @@ gboolean update_cups_queues(gpointer unused) {
            cupsEncodeOptions2(request, num_options, options,
                               IPP_TAG_OPERATION);
            cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
-           ippDelete(cupsDoRequest(http, request, "/admin/"));
+           /*
+            * Do IPP request for printer-is-shared option only when we have
+            * network printer or if we have remote CUPS queue, do IPP request
+            * only if we have CUPS older than 2.2.
+            * When you have remote queue, clean up and break from the loop.
+            */
+           if (p->netprinter != 0 || !HAVE_CUPS_2_2)
+             ippDelete(cupsDoRequest(http, request, "/admin/"));
+           else
+           {
+             ippDelete(request);
+             cupsFreeOptions(num_options, options);
+             break;
+           }
            cupsFreeOptions(num_options, options);
            if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE) {
              debug_printf("Unable change printer-is-shared bit to %s (%s)!\n",