summaryrefslogtreecommitdiff
path: root/gsupplicant/supplicant.c
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-12-23 20:19:37 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2020-12-23 20:19:37 +0900
commit4b35ef68761853c967806474c84216ba2a3c006c (patch)
treef62e557bbdb31448ad25196eabbff1e341cf564f /gsupplicant/supplicant.c
parentb3d6037c3a19870964c3ab3c921c5e9398a1a537 (diff)
downloadconnman-4b35ef68761853c967806474c84216ba2a3c006c.tar.gz
connman-4b35ef68761853c967806474c84216ba2a3c006c.tar.bz2
connman-4b35ef68761853c967806474c84216ba2a3c006c.zip
Remove useless network path of the wifi interface when removing networksubmit/tizen_6.0/20210105.073751accepted/tizen/6.0/unified/20210107.080326
When removing a network, if the network path of the interface is not NULL and has the same information as the network to be removed, it need to be removed. Otherwise, when a connection to the same network is attempted later, the connection may not work normally. Change-Id: I788189a1b2e3ac00c5c9e9804d8543ec44ee705b Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Diffstat (limited to 'gsupplicant/supplicant.c')
-rwxr-xr-xgsupplicant/supplicant.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 86100ebe..992639d7 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -7739,7 +7739,7 @@ int g_supplicant_interface_connect(GSupplicantInterface *interface,
interface_add_network_result, data,
interface);
}
- }
+ }
if (ret < 0) {
g_free(data->path);
@@ -7944,6 +7944,49 @@ int g_supplicant_interface_disconnect(GSupplicantInterface *interface,
return ret;
}
+#if defined TIZEN_EXT
+void g_supplicant_interface_remove_network(GSupplicantInterface *interface,
+ GSupplicantSSID *ssid)
+{
+ struct interface_data *data;
+ int ret;
+
+ SUPPLICANT_DBG("");
+
+ if (!interface)
+ return;
+
+ if (interface->network_path == NULL)
+ return;
+
+ if (!interface->network_info.ssid)
+ return;
+
+ if (memcmp(interface->network_info.ssid, ssid->ssid, ssid->ssid_len))
+ return;
+
+ if (interface->network_info.security != ssid->security)
+ return;
+
+ data = dbus_malloc0(sizeof(*data));
+ if (!data)
+ return;
+
+ data->interface = interface;
+ data->path = g_strdup(interface->path);
+
+ ret = supplicant_dbus_method_call(interface->path,
+ SUPPLICANT_INTERFACE ".Interface", "RemoveNetwork",
+ network_remove_params, network_remove_result, data,
+ interface);
+
+ if (ret < 0) {
+ g_free(data->path);
+ dbus_free(data);
+ }
+}
+#endif
+
static void interface_p2p_find_result(const char *error,
DBusMessageIter *iter, void *user_data)
{