summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-15 10:43:46 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-17 10:31:23 (GMT)
commitd6b5205c4674173e05d9fc421dcf898314c62d8d (patch)
tree3c5cea428c0b636e3aac7af671bfb009a992536f /gsupplicant
parenta59c6e4a0176ca9ad05c1980dcebfbb07b8a188f (diff)
downloadconnman-d6b5205c4674173e05d9fc421dcf898314c62d8d.zip
connman-d6b5205c4674173e05d9fc421dcf898314c62d8d.tar.gz
connman-d6b5205c4674173e05d9fc421dcf898314c62d8d.tar.bz2
[SPIN] request RemoveNetwork when disconnected to stop scanning in supplicant.refs/changes/40/74640/3
Change-Id: I4248b2de4d00d4218dcfac078bcda3e95db83896 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'gsupplicant')
-rwxr-xr-xgsupplicant/gsupplicant.h3
-rwxr-xr-xgsupplicant/supplicant.c25
2 files changed, 28 insertions, 0 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 776f613..9d53d16 100755
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -291,6 +291,9 @@ int g_supplicant_interface_disconnect(GSupplicantInterface *interface,
GSupplicantInterfaceCallback callback,
void *user_data);
+#if defined TIZEN_EXT
+int g_supplicant_interface_remove_network(GSupplicantInterface *interface);
+#endif
int g_supplicant_interface_set_apscan(GSupplicantInterface *interface,
unsigned int ap_scan);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 2bb676e..fb71df6 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -2254,6 +2254,9 @@ static void interface_property(const char *key, DBusMessageIter *iter,
} else if (g_strcmp0(key, "CurrentBSS") == 0) {
interface_bss_added_without_keys(iter, interface);
} else if (g_strcmp0(key, "CurrentNetwork") == 0) {
+#if defined TIZEN_EXT
+ if (interface->state != G_SUPPLICANT_STATE_COMPLETED)
+#endif
interface_network_added(iter, interface);
} else if (g_strcmp0(key, "BSSs") == 0) {
supplicant_dbus_array_foreach(iter,
@@ -5606,6 +5609,28 @@ int g_supplicant_set_widi_ies(GSupplicantP2PServiceParams *p2p_service_params,
return -EINPROGRESS;
}
+#if defined TIZEN_EXT
+int g_supplicant_interface_remove_network(GSupplicantInterface *interface)
+{
+ struct interface_data *data;
+
+ SUPPLICANT_DBG("");
+
+ if (interface == NULL)
+ return -EINVAL;
+
+ if (system_available == FALSE)
+ return -EFAULT;
+
+ data = dbus_malloc0(sizeof(*data));
+ if (data == NULL)
+ return -ENOMEM;
+
+ data->interface = interface;
+
+ return network_remove(data);
+}
+#endif
static const char *g_supplicant_rule0 = "type=signal,"
"path=" DBUS_PATH_DBUS ","