[gnome-settings-daemon/benzea/print-notification-storm] print-notifications: Ignore Server* messages from cups notifier



commit 2f6dbdbab1ce977b72fa6937ac29df3887b80558
Author: Benjamin Berg <bberg redhat com>
Date:   Fri Sep 28 17:32:48 2018 +0200

    print-notifications: Ignore Server* messages from cups notifier
    
    In the past there was a bug where querying the notification information
    from cups caused a new ServerAudit notification to be emitted. We are
    only interested in Printer* and Job* notifications, so ignore any
    notification that starts with "Server" preventing a similar storm from
    our side.
    
    Fixes #62

 plugins/print-notifications/gsd-print-notifications-manager.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c 
b/plugins/print-notifications/gsd-print-notifications-manager.c
index b8bfa8ae..465fc657 100644
--- a/plugins/print-notifications/gsd-print-notifications-manager.c
+++ b/plugins/print-notifications/gsd-print-notifications-manager.c
@@ -351,6 +351,13 @@ on_cups_notification (GDBusConnection *connection,
                       GVariant        *parameters,
                       gpointer         user_data)
 {
+        /* Ignore any signal starting with Server*. This has caused a message
+         * storm through ServerAudit messages in the past, see
+         *  https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/62
+         */
+        if (!signal_name || (strncmp (signal_name, "Server", 6) == 0))
+                return;
+
         process_new_notifications (user_data);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]