summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2019-09-06 20:52:47 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-09-06 20:52:47 +0530
commit55c73c5d731572b1c92894ac57150555b7e61216 (patch)
treeb0924f5541567d5a4d8adab7efd32bf641d050dd /src/network.c
parent99b2c81f38ae73c1f31b8f310f4445dcab534fe8 (diff)
downloadconnman-55c73c5d731572b1c92894ac57150555b7e61216.tar.gz
connman-55c73c5d731572b1c92894ac57150555b7e61216.tar.bz2
connman-55c73c5d731572b1c92894ac57150555b7e61216.zip
Emit Service PropertyChanged when ConnectReason and DisconnectionRequested changes
Description: The properties perform below tasks:- 1. ConnectReason: To identify whether connection was an autoconnection or user initiated. 2. DisconnectionRequested: To identify whether disconnection was user initiated or not. Change-Id: I2ba4fc4637673571745517cdc33fc3a6d6367953 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'src/network.c')
-rwxr-xr-xsrc/network.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c
index 9e5d9619..fc57dcc8 100755
--- a/src/network.c
+++ b/src/network.c
@@ -1705,6 +1705,8 @@ int __connman_network_connect(struct connman_network *network)
__connman_device_disconnect(network->device);
#if defined TIZEN_EXT
DBG("ConnMan, Connect Request [%s]", network->name);
+ struct connman_service *service = connman_service_lookup_from_network(network);
+ connman_service_set_disconnection_requested(service, false);
#endif
err = network->driver->connect(network);
if (err < 0) {
@@ -1746,6 +1748,8 @@ int __connman_network_disconnect(struct connman_network *network)
network->connecting = false;
#if defined TIZEN_EXT
DBG("ConnMan, Disconnect request");
+ struct connman_service *service = connman_service_lookup_from_network(network);
+ connman_service_set_disconnection_requested(service, true);
#endif
if (network->driver->disconnect)
err = network->driver->disconnect(network);