diff options
author | Marit Henriksen <marit.henriksen@stericsson.com> | 2011-01-04 09:42:04 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-04 01:24:26 -0800 |
commit | 42f31348027b8a9c0e31f7ef272179c60366cb51 (patch) | |
tree | 00a194feb60b7e9945a24d978eba37902623d859 | |
parent | e5120c96e9709518a3dff511dbde0d8a4f655333 (diff) | |
download | ofono-42f31348027b8a9c0e31f7ef272179c60366cb51.tar.bz2 |
stemodem: Fix for MT call not working when caller id is hidden.
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.
-rw-r--r-- | drivers/stemodem/voicecall.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index bf68f52a..99383cf1 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -442,10 +442,15 @@ 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; } |