From: Marit Henriksen <[email protected]>

In *ECAV, the number will not be included if caller id is hidden.
Set it to an empty string in that case.
---
 drivers/stemodem/voicecall.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c
index b9d91d2..d900666 100644
--- a/drivers/stemodem/voicecall.c
+++ b/drivers/stemodem/voicecall.c
@@ -442,10 +442,14 @@ static void ecav_notify(GAtResult *result, gpointer 
user_data)
        if (status == CALL_STATUS_DIALING ||
                        status == CALL_STATUS_WAITING ||
                        status == CALL_STATUS_INCOMING) {
+               /*
+               * 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))
-                       return;
-
-               if (!g_at_result_iter_next_number(&iter, &num_type))
+                       num = "";
+               else if (!g_at_result_iter_next_number(&iter, &num_type))
                        return;
        }
 
-- 
1.7.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to