summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2019-04-30 17:52:29 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-08-27 10:04:53 +0530
commit99b2c81f38ae73c1f31b8f310f4445dcab534fe8 (patch)
treeae32a8743d0fb8137a81d0113ae3aae8ea18c8c1 /src/service.c
parentd9c4473ac7a38978f0c8922ddb72849320faab75 (diff)
downloadconnman-99b2c81f38ae73c1f31b8f310f4445dcab534fe8.tar.gz
connman-99b2c81f38ae73c1f31b8f310f4445dcab534fe8.tar.bz2
connman-99b2c81f38ae73c1f31b8f310f4445dcab534fe8.zip
Update RSSI/Strength of connected service using SignalPoll event
This patch reduced the SignalPoll monitor from 30 second to 10 second frequency. This patch also extracts already available parameter strength/RSSI in SignalPoll and update connected service's RSSI/Strength accordingly. Change-Id: Ie9bbb21bf50ad0b8c72e3ca2fc9f7f6500c77f23 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 6331ae41..85bcc318 100644
--- a/src/service.c
+++ b/src/service.c
@@ -9282,6 +9282,30 @@ struct connman_service * __connman_service_create_from_network(struct connman_ne
return service;
}
+#if defined TIZEN_EXT
+void __connman_service_notify_strength_changed(struct connman_network *network)
+{
+ struct connman_service *service;
+ uint8_t strength = 0;
+
+ service = connman_service_lookup_from_network(network);
+ if (!service)
+ return;
+
+ if (!service->network)
+ return;
+
+ strength = connman_network_get_strength(service->network);
+ if (strength == service->strength)
+ return;
+
+ service->strength = strength;
+ DBG("Strength %d", strength);
+ strength_changed(service);
+ service_list_sort();
+}
+#endif
+
void __connman_service_update_from_network(struct connman_network *network)
{
bool need_sort = false;