All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenhua Zhang <zhenhua.zhang@intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH 08/10] Fix do not emit error if extended error has emitted
Date: Tue, 23 Mar 2010 17:10:06 +0800	[thread overview]
Message-ID: <4BA8856E.8000706@intel.com> (raw)
In-Reply-To: <201003221327.53092.denkenz@gmail.com>

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

Hi Denis,

On 03/23/2010 02:27 AM, Denis Kenzior wrote:
> Hi Zhenhua,
>
>> ---
>>   gatchat/gatserver.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
>> index 1ffc2c3..9683fa3 100644
>> --- a/gatchat/gatserver.c
>> +++ b/gatchat/gatserver.c
>> @@ -165,6 +165,10 @@ static void g_at_server_send_final(GAtServer *server,
>>   GAtServerResult result) char r = v250.s4;
>>   	unsigned int len;
>>
>> +	/* Do not emit error if extended error has already been emitted */
>> +	if (result == G_AT_SERVER_RESULT_EXT_ERROR)
>> +		return;
>> +
>
> I really don't get it, why would anyone call g_at_server_send_final with
> EXT_ERROR?  Don't we have g_at_server_send_ext_final or something for that?

I understand your point. My thinking is that callback should return 
GAtServrResult so that the main logic know whether we should parse the 
next command or abort parsing. But if the function call is 
asynchronized, I don't know, do you want send_final able to abort the 
parsing iteration?

>>   	if (v250.quiet)
>>   		return;
>>
>
> Regards,
> -Denis
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono
>


  reply	other threads:[~2010-03-23  9:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  9:44 Add parse framework for GAtServer Zhenhua Zhang
2010-03-19  9:44 ` [PATCH 01/10] Add framework of server parser Zhenhua Zhang
2010-03-19  9:44   ` [PATCH 02/10] Add basic command parsing Zhenhua Zhang
2010-03-19  9:44     ` [PATCH 03/10] Add extended " Zhenhua Zhang
2010-03-19  9:44       ` [PATCH 04/10] Add server at command data structure Zhenhua Zhang
2010-03-19  9:44         ` [PATCH 05/10] Add notify at command callback Zhenhua Zhang
2010-03-19  9:44           ` [PATCH 06/10] Add g_at_server_register and unregister callback Zhenhua Zhang
2010-03-19  9:44             ` [PATCH 07/10] Add G_AT_SERVER_RESULT_EXT_ERROR Zhenhua Zhang
2010-03-19  9:44               ` [PATCH 08/10] Fix do not emit error if extended error has emitted Zhenhua Zhang
2010-03-19  9:44                 ` [PATCH 09/10] Refactor g_at_server_send_final Zhenhua Zhang
2010-03-19  9:44                   ` [PATCH 10/10] Add utilities to send server response Zhenhua Zhang
2010-03-22 18:27                 ` [PATCH 08/10] Fix do not emit error if extended error has emitted Denis Kenzior
2010-03-23  9:10                   ` Zhenhua Zhang [this message]
2010-03-22 18:24               ` [PATCH 07/10] Add G_AT_SERVER_RESULT_EXT_ERROR Denis Kenzior
2010-03-22 18:24             ` [PATCH 06/10] Add g_at_server_register and unregister callback Denis Kenzior
2010-03-22 18:22           ` [PATCH 05/10] Add notify at command callback Denis Kenzior
2010-03-22 18:22         ` [PATCH 04/10] Add server at command data structure Denis Kenzior
2010-03-22 18:01       ` [PATCH 03/10] Add extended command parsing Denis Kenzior
2010-03-22 18:19     ` [PATCH 02/10] Add basic " Denis Kenzior
2010-03-22 18:02   ` [PATCH 01/10] Add framework of server parser Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA8856E.8000706@intel.com \
    --to=zhenhua.zhang@intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.