diff options
-rw-r--r-- | src/connman.h | 2 | ||||
-rw-r--r-- | src/rtnl.c | 2 | ||||
-rw-r--r-- | src/technology.c | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/connman.h b/src/connman.h index 495eef4e..5507b153 100644 --- a/src/connman.h +++ b/src/connman.h @@ -471,7 +471,7 @@ int __connman_technology_remove_rfkill(unsigned int index, void __connman_technology_scan_started(struct connman_device *device); void __connman_technology_scan_stopped(struct connman_device *device); void __connman_technology_add_interface(enum connman_service_type type, - int index, const char *name, const char *ident); + int index, const char *ident); void __connman_technology_remove_interface(enum connman_service_type type, int index, const char *ident); void __connman_technology_notify_regdom_by_device(struct connman_device *device, @@ -481,7 +481,7 @@ static void process_newlink(unsigned short type, int index, unsigned flags, */ if (interface != NULL) __connman_technology_add_interface(interface->service_type, - interface->index, interface->name, interface->ident); + interface->index, interface->ident); for (list = watch_list; list; list = list->next) { struct watch_data *watch = list->data; diff --git a/src/technology.c b/src/technology.c index 6dfdb6a5..9796646c 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1252,11 +1252,12 @@ static void enable_tethering(struct connman_technology *technology) } void __connman_technology_add_interface(enum connman_service_type type, - int index, const char *name, const char *ident) + int index, const char *ident) { struct connman_technology *technology; GSList *tech_drivers; struct connman_technology_driver *driver; + char *name; switch (type) { case CONNMAN_SERVICE_TYPE_UNKNOWN: @@ -1272,13 +1273,14 @@ void __connman_technology_add_interface(enum connman_service_type type, break; } + name = connman_inet_ifname(index); connman_info("Adding interface %s [ %s ]", name, __connman_service_type2string(type)); technology = technology_find(type); if (technology == NULL) - return; + goto out; for (tech_drivers = technology->driver_list; tech_drivers != NULL; tech_drivers = g_slist_next(tech_drivers)) { @@ -1294,6 +1296,9 @@ void __connman_technology_add_interface(enum connman_service_type type, */ if (technology->tethering_persistent == TRUE) enable_tethering(technology); + +out: + g_free(name); } void __connman_technology_remove_interface(enum connman_service_type type, |