Don't match driver for root element
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 9 Aug 2008 22:26:44 +0000 (00:26 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 9 Aug 2008 22:26:44 +0000 (00:26 +0200)
src/element.c

index 7c892e6..2d4c5fb 100644 (file)
@@ -325,6 +325,9 @@ static gint compare_priority(gconstpointer a, gconstpointer b)
 static gboolean match_driver(struct connman_element *element,
                                        struct connman_driver *driver)
 {
+       if (element->type == CONNMAN_ELEMENT_TYPE_ROOT)
+               return FALSE;
+
        if (element->type != driver->type &&
                        driver->type != CONNMAN_ELEMENT_TYPE_UNKNOWN)
                return FALSE;