linux-bluetooth.vger.kernel.org archive mirror
 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

* [PATCH 2/2] telephony-ofono: fix not resetting network status and signal on modem removed
  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 ` Luiz Augusto von Dentz
  2011-02-18 16:51 ` [PATCH 1/2] telephony-ofono: reset indicators when a network is found Johan Hedberg
  1 sibling, 0 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>

This prevent using status and signal from previous active modem
---
 audio/telephony-ofono.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index bc8fea2..0a7f0bd 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -1042,6 +1042,8 @@ static void modem_removed(const char *path)
 
 	g_free(net.operator_name);
 	net.operator_name = NULL;
+	net.status = NETWORK_REG_STATUS_NOSERV;
+	net.signals_bar = 0;
 
 	g_free(modem_obj_path);
 	modem_obj_path = NULL;
-- 
1.7.1


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

* Re: [PATCH 1/2] telephony-ofono: reset indicators when a network is found
  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 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-02-18 16:51 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Fri, Feb 18, 2011, Luiz Augusto von Dentz wrote:
> 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(-)

Pushed upstream. Thanks.

Be careful with the commit message line lengths. The summary line of
your second patch was too long for git log on a 80-character wide
terminal (I fixed this manually).

Johan

^ permalink raw reply	[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;
as well as URLs for NNTP newsgroup(s).