stemodem: Fix for MT call not working when caller id is hidden.
PATCH v2 1/1 stemodem: Fix for MT call not working when caller id is hidden.
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, and set number type to 128, unknown number type.
--- drivers/stemodem/voicecall.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-)
drivers/stemodem/voicecall.c +11 -5
@@ -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 ; }
Signature · 1 line
1.7.1
Hi Marit,
Quoted 20 lines
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(-)drivers/stemodem/voicecall.c +1
-1@@ -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 ||
drivers/stemodem/voicecall.c static void ecav_notify(GAtResult *result, gpointer user_data) · line 449
Quoted 10 lines
drivers/stemodem/voicecall.c +5
-4status == 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. +*/
please fix the comment according coding style. See M2.
drivers/stemodem/voicecall.c static void ecav_notify(GAtResult *result, gpointer user_data) · line 451
Quoted 2 lines
drivers/stemodem/voicecall.c +2
-0+if (!g_at_result_iter_next_string (&iter, &num)) { + num="" ;
This needs to be num = ""; btw.
drivers/stemodem/voicecall.c static void ecav_notify(GAtResult *result, gpointer user_data) · line 455
Quoted 4 lines
drivers/stemodem/voicecall.c +3
-0+ num_type =128 ; + } +else if (!g_at_result_iter_next_number (&iter, &num_type))return ;
And the else here should be on the same line as with the }.
Regards
Marcel