All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stemodem: Fix for MT call not working when caller id is hidden.
@ 2010-12-16 13:56 Marit Henriksen
  2010-12-17 16:09 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Marit Henriksen @ 2010-12-16 13:56 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1043 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.
---
 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


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

* Re: [PATCH] stemodem: Fix for MT call not working when caller id is hidden.
  2010-12-16 13:56 [PATCH] stemodem: Fix for MT call not working when caller id is hidden Marit Henriksen
@ 2010-12-17 16:09 ` Denis Kenzior
  2010-12-20 12:59   ` Marit Sofie Henriksen
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2010-12-17 16:09 UTC (permalink / raw)
  To: ofono

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

Hi Marit,

On 12/16/2010 07:56 AM, Marit Henriksen wrote:
> 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.
> ---
>  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;

One small nitpick, but you're not initializing num_type if the number is
missing.  While this probably works out, I'd rather be a bit more
pedantic inside the driver.  Can you initialize it to unknown number
type (I think 128 is preferred by 27.007) in this case?

>  	}
>  

I also notice that you're not ever able to report the clip_validity == 1
case (e.g. number withheld).  Since oFono does make a distinction
between the various clip_validity types, it would be nice if there was a
way around this limitation.

Regards,
-Denis

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

* Re: [PATCH] stemodem: Fix for MT call not working when caller id is hidden.
  2010-12-17 16:09 ` Denis Kenzior
@ 2010-12-20 12:59   ` Marit Sofie Henriksen
  2010-12-20 15:24     ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Marit Sofie Henriksen @ 2010-12-20 12:59 UTC (permalink / raw)
  To: ofono

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

2010/12/17 Denis Kenzior <denkenz@gmail.com>

> Hi Marit,
>
> On 12/16/2010 07:56 AM, Marit Henriksen wrote:
> > 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.
> > ---
> >  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;
>
> One small nitpick, but you're not initializing num_type if the number is
> missing.  While this probably works out, I'd rather be a bit more
> pedantic inside the driver.  Can you initialize it to unknown number
> type (I think 128 is preferred by 27.007) in this case?
>
>
  OK, I will fix this and send a new version of the patch.

>       }
> >
>
> I also notice that you're not ever able to report the clip_validity == 1
> case (e.g. number withheld).  Since oFono does make a distinction
> between the various clip_validity types, it would be nice if there was a
> way around this limitation.
>
>
I will look into that, but I would like to keep it out of this fix, and
rather do it as an improvement, OK?

regards, Marit


Regards,
> -Denis
>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3125 bytes --]

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

* Re: [PATCH] stemodem: Fix for MT call not working when caller id is hidden.
  2010-12-20 12:59   ` Marit Sofie Henriksen
@ 2010-12-20 15:24     ` Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2010-12-20 15:24 UTC (permalink / raw)
  To: ofono

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

Hi Marit,

> I will look into that, but I would like to keep it out of this fix, and
> rather do it as an improvement, OK?

That's fine.

Regards,
-Denis

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

end of thread, other threads:[~2010-12-20 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 13:56 [PATCH] stemodem: Fix for MT call not working when caller id is hidden Marit Henriksen
2010-12-17 16:09 ` Denis Kenzior
2010-12-20 12:59   ` Marit Sofie Henriksen
2010-12-20 15:24     ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.