diff options
-rwxr-xr-x | gsupplicant/supplicant.c | 14 | ||||
-rwxr-xr-x | include/technology.h | 2 | ||||
-rw-r--r-- | src/connman.conf | 2 | ||||
-rwxr-xr-x | src/device.c | 4 | ||||
-rw-r--r-- | src/technology.c | 20 |
5 files changed, 36 insertions, 6 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index cdf6007c..8329975b 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -4356,10 +4356,20 @@ static void signal_network_removed(const char *path, DBusMessageIter *iter) interface_network_removed(iter, interface); } + #if defined TIZEN_EXT -void *copy_vsie_list(gconstpointer src, gpointer data) +gpointer copy_vsie_list(gconstpointer src, gpointer data) { - return g_strdup(src); + unsigned char *str = (unsigned char *)src; + unsigned char *vsie; + vsie = g_try_malloc0(str[1]+2); + + if (vsie) + memcpy(vsie, str, str[1]+2); + else + SUPPLICANT_DBG("Failed to allocate memory"); + + return vsie; } #endif diff --git a/include/technology.h b/include/technology.h index 127dea95..c7898396 100755 --- a/include/technology.h +++ b/include/technology.h @@ -95,6 +95,8 @@ const char *connman_techonology_get_path(enum connman_service_type type); void __connman_technology_notify_scan_done(const char *ifname, int val); void __connman_technology_append_interfaces(DBusMessageIter *array, enum connman_service_type type, const char *ifname); +void __connman_technology_notify_device_detected_by_device( + struct connman_device *device, const char *ifname, bool val); void __connman_technology_notify_roaming_state(const char *ifname, const char *state, const char *cur_bssid, const char *dst_bssid); #endif diff --git a/src/connman.conf b/src/connman.conf index 2d51f0d0..3d113a72 100644 --- a/src/connman.conf +++ b/src/connman.conf @@ -36,6 +36,8 @@ <check send_destination="net.connman" send_interface="net.connman.Service" send_member="GetProperties" privilege="http://tizen.org/privilege/network.get" /> <check send_destination="net.connman" send_interface="net.connman.Service" send_member="Remove" privilege="http://tizen.org/privilege/network.profile" /> <check send_destination="net.connman" send_interface="net.connman.Service" send_member="PropertyChanged" privilege="http://tizen.org/privilege/network.get" /> + <check send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetProperties" privilege="http://tizen.org/privilege/network.get" /> + <check send_destination="net.connman" send_interface="net.connman.Technology" send_member="SetProperty" privilege="http://tizen.org/privilege/network.set" /> <check send_destination="net.connman" send_interface="net.connman.Technology" send_member="Scan" privilege="http://tizen.org/privilege/network.set" /> <check send_destination="net.connman" send_interface="net.connman.Technology" send_member="SpecificScan" privilege="http://tizen.org/privilege/network.set" /> <check send_destination="net.connman" send_interface="net.connman.Technology" send_member="ScanDevice" privilege="http://tizen.org/privilege/network.set" /> diff --git a/src/device.c b/src/device.c index 9ba52c27..da86084f 100755 --- a/src/device.c +++ b/src/device.c @@ -388,6 +388,10 @@ static void remove_device(struct connman_device *device) if (device->driver->remove) device->driver->remove(device); +#if defined TIZEN_EXT + __connman_technology_notify_device_detected_by_device(device, "", false); +#endif + device->driver = NULL; } diff --git a/src/technology.c b/src/technology.c index 4cc540bb..d21d790f 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1715,6 +1715,19 @@ static void __connman_technology_notify_device_detected( DBG("Successfuly sent DeviceDetected signal"); } +void __connman_technology_notify_device_detected_by_device( + struct connman_device *device, const char *ifname, bool val) +{ + struct connman_technology *technology; + enum connman_service_type type; + + type = __connman_device_get_service_type(device); + + technology = technology_find(type); + if (technology) + __connman_technology_notify_device_detected(technology, ifname, val); +} + void __connman_technology_notify_roaming_state(const char *ifname, const char *state, const char *cur_bssid, const char *dst_bssid) { @@ -3002,7 +3015,9 @@ static void technology_put(struct connman_technology *technology) g_slist_delete_link(technology->driver_list, technology->driver_list); } - +#ifdef TIZEN_EXT + __connman_technology_notify_device_detected(technology, "", false); +#endif technology_list = g_slist_remove(technology_list, technology); technology_dbus_unregister(technology); @@ -3422,9 +3437,6 @@ int __connman_technology_remove_device(struct connman_device *device) #if defined TIZEN_EXT technology_save_device(device); - - const char *ifname = connman_device_get_string(device, "Interface"); - __connman_technology_notify_device_detected(technology, ifname, false); #endif if (technology->tethering) |