projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
06e9ead
)
service: Add interface name matching in __connman_service_lookup().
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 30 Sep 2011 09:06:30 +0000
(12:06 +0300)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Wed, 5 Oct 2011 10:05:50 +0000
(12:05 +0200)
Fixes BMC#23419
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index
ae15470
..
22f8320
100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-4588,6
+4588,8
@@
int __connman_service_lookup(const char *pattern, const char **path)
{
GHashTableIter iter;
gpointer key, value;
{
GHashTableIter iter;
gpointer key, value;
+ struct connman_device *device;
+ const char *ifname;
g_hash_table_iter_init(&iter, service_hash);
g_hash_table_iter_init(&iter, service_hash);
@@
-4600,6
+4602,20
@@
int __connman_service_lookup(const char *pattern, const char **path)
*path = (const char *) service->path;
return 0;
}
*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;
}
return -ENXIO;