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:
73f3349
)
Do not register 2 network drivers for the same network type
author
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 20 Sep 2010 16:21:51 +0000
(18:21 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 20 Sep 2010 16:21:51 +0000
(18:21 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
820ce99
..
aebf7cf
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-266,8
+266,18
@@
static gint compare_priority(gconstpointer a, gconstpointer b)
*/
int connman_network_driver_register(struct connman_network_driver *driver)
{
+ GSList *list;
+
DBG("driver %p name %s", driver, driver->name);
+ for (list = driver_list; list; list = list->next) {
+ struct connman_network_driver *tmp = list->data;
+
+ if (tmp->type == driver->type)
+ return -EALREADY;
+
+ }
+
driver_list = g_slist_insert_sorted(driver_list, driver,
compare_priority);