ofono: Ignore non-related interface updates
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 20 Dec 2011 17:39:15 +0000 (18:39 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 22 Dec 2011 10:10:15 +0000 (11:10 +0100)
Only trigger update code if there was a change in
the interface we are interested in.

plugins/ofono.c

index 68fbaeb..4d5c7ab 100644 (file)
@@ -1891,7 +1891,14 @@ static gboolean modem_changed(DBusConnection *connection, DBusMessage *message,
 
                connection_manager_init(modem);
        } else if (g_str_equal(key, "Interfaces") == TRUE) {
-               modem->interfaces = extract_interfaces(&value);
+               uint8_t interfaces;
+
+               interfaces = extract_interfaces(&value);
+
+               if (interfaces == modem->interfaces)
+                       return TRUE;
+
+               modem->interfaces = interfaces;
 
                DBG("%s Interfaces 0x%02x", modem->path,
                        modem->interfaces);