Comment 1 for bug 137984

Revision history for this message
Tim Waugh (twaugh) wrote :

Works fine in Fedora. Wonder if it's to do with this subscriptions fix we apply:

--- cups-1.3b1/scheduler/subscriptions.c.eggcups 2007-07-11 22:46:42.0000
00000 +0100
+++ cups-1.3b1/scheduler/subscriptions.c 2007-07-18 11:34:16.000000000 +0
100
@@ -1292,13 +1292,13 @@
     what = "PrinterAdded";
   else if (event & CUPSD_EVENT_PRINTER_DELETED)
     what = "PrinterRemoved";
- else if (event & CUPSD_EVENT_PRINTER_CHANGED)
- what = "QueueChanged";
   else if (event & CUPSD_EVENT_JOB_CREATED)
     what = "JobQueuedLocal";
   else if ((event & CUPSD_EVENT_JOB_STATE) && job &&
            job->state_value == IPP_JOB_PROCESSING)
     what = "JobStartedLocal";
+ else if (event & (CUPSD_EVENT_PRINTER_CHANGED|CUPSD_EVENT_JOB_STATE_CHANGED|C
UPSD_EVENT_PRINTER_STATE_CHANGED))
+ what = "QueueChanged";
   else
     return;

@@ -1334,7 +1334,7 @@
   dbus_message_append_iter_init(message, &iter);
   if (dest)
     dbus_message_iter_append_string(&iter, dest->name);
- if (job)
+ if (job && strcmp (what, "QueueChanged") != 0)
   {
     dbus_message_iter_append_uint32(&iter, job->id);
     dbus_message_iter_append_string(&iter, job->username);

I hope that a future version of CUPS will include a proper D-Bus notifier; that will make this a lot cleaner.