Use glob pattern matching for interface names
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Oct 2008 12:19:52 +0000 (14:19 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Oct 2008 12:19:52 +0000 (14:19 +0200)
src/element.c

index 9260d16..2934edd 100644 (file)
@@ -953,7 +953,8 @@ int connman_element_register(struct connman_element *element,
        DBG("element %p name %s parent %p", element, element->name, parent);
 
        if (device_filter && element->type == CONNMAN_ELEMENT_TYPE_DEVICE) {
-               if (g_str_equal(device_filter, element->name) == FALSE) {
+               if (g_pattern_match_simple(device_filter,
+                                               element->name) == FALSE) {
                        DBG("ignoring %s device", element->name);
                        return -EPERM;
                }