Open Source Telephony
 help / color / mirror / Atom feed
* [PATCHv2] stemodem: Fix for MT call not working when caller id is hidden.
@ 2011-01-03 12:59 Marit Henriksen
  2011-01-03 20:24 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Marit Henriksen @ 2011-01-03 12:59 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

From: Marit Henriksen <marit.henriksen@stericsson.com>

In *ECAV, the number will not be included if caller id is hidden.
Set it to an empty string in that case, and set number type to
128, unknown number type.
---
 drivers/stemodem/voicecall.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c
index bf68f52..4964fb7 100644
--- a/drivers/stemodem/voicecall.c
+++ b/drivers/stemodem/voicecall.c
@@ -1,4 +1,4 @@
-/*
+e/*
  *
  *  oFono - Open Source Telephony
  *
@@ -442,10 +442,16 @@ static void ecav_notify(GAtResult *result, gpointer user_data)
 	if (status == CALL_STATUS_DIALING ||
 			status == CALL_STATUS_WAITING ||
 			status == CALL_STATUS_INCOMING) {
-		if (!g_at_result_iter_next_string(&iter, &num))
-			return;
-
-		if (!g_at_result_iter_next_number(&iter, &num_type))
+		/*
+		* If caller uses hidden id, the number and
+		* number type might not be present. Don't
+		* look for type if number is not present.
+		*/
+		if (!g_at_result_iter_next_string(&iter, &num)) {
+			num="";
+			num_type = 128;
+		}
+		else if (!g_at_result_iter_next_number(&iter, &num_type))
 			return;
 	}
 
-- 
1.7.1


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

end of thread, other threads:[~2011-01-03 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 12:59 [PATCHv2] stemodem: Fix for MT call not working when caller id is hidden Marit Henriksen
2011-01-03 20:24 ` Marcel Holtmann

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