]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- work on dbus interface
authorArvin Schnell <aschnell@suse.de>
Wed, 8 Aug 2012 15:05:19 +0000 (17:05 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 8 Aug 2012 15:05:19 +0000 (17:05 +0200)
dbus/DBusMainLoop.cc

index 8ac8da58b89642f8588d713ed0e572b5f808371a..c46fb80e2f94735d0411bca5a3e38b53076a160b 100644 (file)
@@ -46,7 +46,10 @@ namespace DBus
 
        dbus_connection_set_wakeup_main_function(conn, wakeup_main, this, NULL);
 
-       add_match("type='signal', interface='" DBUS_INTERFACE_DBUS "', member='NameOwnerChanged'");
+       // Filtering for the sender doesn't work for me. So also check the
+       // sender later when handling the signal.
+       add_match("type='signal', sender='" DBUS_SERVICE_DBUS "', path='" DBUS_PATH_DBUS "', "
+                 "interface='" DBUS_INTERFACE_DBUS "', member='NameOwnerChanged'");
     }
 
 
@@ -290,7 +293,8 @@ namespace DBus
            {
                signal(msg);
 
-               if (msg.is_signal(DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
+               if (msg.get_sender() == DBUS_SERVICE_DBUS &&
+                   msg.is_signal(DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
                {
                    string name, old_owner, new_owner;