Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] telephony-ofono: reset indicators when a network is found
@ 2011-02-18 16:24 Luiz Augusto von Dentz
  2011-02-18 16:24 ` [PATCH 2/2] telephony-ofono: fix not resetting network status and signal on modem removed Luiz Augusto von Dentz
  2011-02-18 16:51 ` [PATCH 1/2] telephony-ofono: reset indicators when a network is found Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2011-02-18 16:24 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>

Indicators may have invalid values set from the last time they were used
---
 audio/telephony-ofono.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 4e78801..bc8fea2 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -935,6 +935,15 @@ static int parse_network_properties(DBusMessageIter *properties)
 				AG_FEATURE_ENHANCED_CALL_CONTROL |
 				AG_FEATURE_EXTENDED_ERROR_RESULT_CODES |
 				AG_FEATURE_THREE_WAY_CALLING;
+	int i;
+
+	/* Reset indicators */
+	for (i = 0; ofono_indicators[i].desc != NULL; i++) {
+		if (g_str_equal(ofono_indicators[i].desc, "battchg"))
+			ofono_indicators[i].val = 5;
+		else
+			ofono_indicators[i].val = 0;
+	}
 
 	while (dbus_message_iter_get_arg_type(properties)
 						== DBUS_TYPE_DICT_ENTRY) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-18 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 16:24 [PATCH 1/2] telephony-ofono: reset indicators when a network is found Luiz Augusto von Dentz
2011-02-18 16:24 ` [PATCH 2/2] telephony-ofono: fix not resetting network status and signal on modem removed Luiz Augusto von Dentz
2011-02-18 16:51 ` [PATCH 1/2] telephony-ofono: reset indicators when a network is found Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox