RE: Patch on unsupported AT command

2009-11-24 Thread Marcel Holtmann
Hi Yang, > >Maybe it is too early in the morning to do code review, but this should > >be doing the same, but be a lot simpler to read ;) > > You're absolutely right. In this way, the code is more readable. Please > review again. both patches have been applied. Thanks. Regards Marcel _

RE: Patch on unsupported AT command

2009-11-24 Thread Gu, Yang
>-Original Message- >From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of >Marcel Holtmann >Sent: Monday, November 23, 2009 2:21 PM >To: ofono@ofono.org >Subject: RE: Patch on unsupported AT command > >Hi Yang, > >looks good so far,

Re: Patch on unsupported AT command

2009-11-23 Thread Marcel Holtmann
Hi Denis, > > This is first of all violating the coding style with the indentation on > > the second line of the if, but it is also way too complicated. > > There is actually a reason for this. > > > > > if (info->len == -1 && !strcmp(line, info->terminator) > > return TRUE; >

Re: Patch on unsupported AT command

2009-11-23 Thread Denis Kenzior
Hi Marcel, > This is first of all violating the coding style with the indentation on > the second line of the if, but it is also way too complicated. There is actually a reason for this. > > if (info->len == -1 && !strcmp(line, info->terminator) > return TRUE; This part che

RE: Patch on unsupported AT command

2009-11-22 Thread Marcel Holtmann
Hi Yang, looks good so far, but ... > +static gboolean check_terminator(struct terminator_info *info, char > *line) > +{ > + if ((info->len == -1 && !strcmp(line, info->terminator)) || > + (info->len > 0 && !strncmp(line, info->terminator, > info->len))) > + retu

RE: Patch on unsupported AT command

2009-11-22 Thread Gu, Yang
>-Original Message- >From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of >Marcel Holtmann >Sent: Saturday, November 21, 2009 6:42 PM >To: ofono@ofono.org >Subject: RE: Patch on unsupported AT command > >Hi Yang, > >> >>

RE: Patch on unsupported AT command

2009-11-21 Thread Marcel Holtmann
Hi Yang, > >> >> >+ g_at_chat_add_terminator(chat, "+EXT ERROR:", 11, FALSE); > >> >> >+ g_at_chat_add_terminator(chat, "+CME ERROR:", 11, FALSE); > >> >> >+ g_at_chat_add_terminator(chat, "+CMS ERROR:", 11, FALSE); > >> >> >+ g_at_chat_add_terminator(chat, "NO ANSWER", -1, FAL

RE: Patch on unsupported AT command

2009-11-20 Thread Gu, Yang
>-Original Message- >From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of >Marcel Holtmann >Sent: Friday, November 20, 2009 9:31 PM >To: ofono@ofono.org >Subject: RE: Patch on unsupported AT command > >Hi Yang, > >> >> >+

RE: Patch on unsupported AT command

2009-11-20 Thread Marcel Holtmann
Hi Yang, > >> >+ g_at_chat_add_terminator(chat, "+EXT ERROR:", 11, FALSE); > >> >+ g_at_chat_add_terminator(chat, "+CME ERROR:", 11, FALSE); > >> >+ g_at_chat_add_terminator(chat, "+CMS ERROR:", 11, FALSE); > >> >+ g_at_chat_add_terminator(chat, "NO ANSWER", -1, FALSE); > >> >+ g_at_chat_add_termi

RE: Patch on unsupported AT command

2009-11-20 Thread Gu, Yang
>-Original Message- >From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of >Marcel Holtmann >Sent: Wednesday, November 18, 2009 4:36 AM >To: ofono@ofono.org >Subject: Re: Patch on unsupported AT command > >Hi Denis, > >> >+

Re: Patch on unsupported AT command

2009-11-17 Thread Marcel Holtmann
Hi Denis, > >+g_at_chat_add_terminator(chat, "+EXT ERROR:", 11, FALSE); > >+g_at_chat_add_terminator(chat, "+CME ERROR:", 11, FALSE); > >+g_at_chat_add_terminator(chat, "+CMS ERROR:", 11, FALSE); > >+g_at_chat_add_terminator(chat, "NO ANSWER", -1, FALSE); > >+g_at_chat_add_term

Re: Patch on unsupported AT command

2009-11-17 Thread Denis Kenzior
Hi Yang, > Thanks for the comments. I have split the patch to two separate ones. > Two problems: >+void g_at_chat_add_terminator(GAtChat *chat, const char *terminator, >+ int len, gboolean success) >+{ >+ struct terminator_info *ti = g_new0(struct termin

RE: Patch on unsupported AT command

2009-11-17 Thread Gu, Yang
Hi, >> Attached is the patch to support plugin specific terminator, and it supports >> Huawei's >special one "COMMAND NOT SUPPORT". > >you need to split this into a GAtChat specific patch and oFono plugin >patch. Thanks for the comments. I have split the patch to two separate ones. > >Regards

RE: Patch on unsupported AT command

2009-11-17 Thread Marcel Holtmann
Hi Yang, > >> > > I think this might need a GAtChat quirk function where we can add extra > >> > > terminator responses that will be recognized. And maybe even translated > >> > > into something meaningful. > >> > > >> > Originally I had the terminators freely definable on the GAtChat + some > >>

RE: Patch on unsupported AT command

2009-11-17 Thread Gu, Yang
>-Original Message- >From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of >Denis Kenzior >Sent: Saturday, November 14, 2009 1:06 AM >To: ofono@ofono.org >Subject: Re: Patch on unsupported AT command > >Hi Marcel, > >> Hi Denis, &g

Re: Patch on unsupported AT command

2009-11-13 Thread Denis Kenzior
Hi Marcel, > Hi Denis, > > > > I think this might need a GAtChat quirk function where we can add extra > > > terminator responses that will be recognized. And maybe even translated > > > into something meaningful. > > > > Originally I had the terminators freely definable on the GAtChat + some > >

Re: Patch on unsupported AT command

2009-11-13 Thread Marcel Holtmann
Hi Denis, > > I think this might need a GAtChat quirk function where we can add extra > > terminator responses that will be recognized. And maybe even translated > > into something meaningful. > > Originally I had the terminators freely definable on the GAtChat + some > hardcoded ones, but aband

Re: Patch on unsupported AT command

2009-11-13 Thread Denis Kenzior
Hi Marcel, > I think this might need a GAtChat quirk function where we can add extra > terminator responses that will be recognized. And maybe even translated > into something meaningful. Originally I had the terminators freely definable on the GAtChat + some hardcoded ones, but abandoned that a

Re: Patch on unsupported AT command

2009-11-13 Thread Marcel Holtmann
Hi Yang, > If some unsupported AT command is issued, different modem may have > their own response. Now at my hand is a Huawei modem (EM770W), and it returns > "COMMAND NOT SUPPORT". In my case, this modem doesn't support "AT+CGAUTO=0" > in atmodem/gprs.c. Current oFono will hang there fo

Patch on unsupported AT command

2009-11-12 Thread Gu, Yang
Hi all, If some unsupported AT command is issued, different modem may have their own response. Now at my hand is a Huawei modem (EM770W), and it returns "COMMAND NOT SUPPORT". In my case, this modem doesn't support "AT+CGAUTO=0" in atmodem/gprs.c. Current oFono will hang there for it's n