{
GHashTableIter iter;
gpointer key, value;
+ struct connman_device *device;
+ const char *ifname;
g_hash_table_iter_init(&iter, service_hash);
*path = (const char *) service->path;
return 0;
}
+
+ if (service->network == NULL)
+ continue;
+
+ device = connman_network_get_device(service->network);
+ if (device == NULL)
+ continue;
+
+ ifname = connman_device_get_string(device, "Interface");
+ if (ifname != NULL && g_strcmp0(ifname, pattern) == 0) {
+ *path = (const char *) service->path;
+ return 0;
+ }
+
}
return -ENXIO;