All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: Patch on unsupported AT command
Date: Mon, 23 Nov 2009 04:54:36 -0600	[thread overview]
Message-ID: <200911230454.36858.denkenz@gmail.com> (raw)
In-Reply-To: <1258957264.2993.12.camel@violet>

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

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 checks for static terminators, like "OK" or "BUSY" or ERROR.  We do 
whole string comparison here.

>
> 	if (info->len > 0 && !strncmp(line, info->terminator, ...))
> 		return TRUE;

This part checks for variable terminators.  E.g. +CMS ERROR: XXX.  These are 
well defined by the standard so we only do a prefix comparison for these.

Regards,
-Denis

  reply	other threads:[~2009-11-23 10:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  7:11 Patch on unsupported AT command Gu, Yang
2009-11-13 11:18 ` Marcel Holtmann
2009-11-13 16:38   ` Denis Kenzior
2009-11-13 16:58     ` Marcel Holtmann
2009-11-13 17:05       ` Denis Kenzior
2009-11-17  9:38         ` Gu, Yang
2009-11-17 10:40           ` Marcel Holtmann
2009-11-17 16:27             ` Gu, Yang
2009-11-17 17:56               ` Denis Kenzior
2009-11-17 20:35                 ` Marcel Holtmann
2009-11-20  9:02                   ` Gu, Yang
2009-11-20 13:30                     ` Marcel Holtmann
2009-11-21  5:54                       ` Gu, Yang
2009-11-21 10:41                         ` Marcel Holtmann
2009-11-23  2:41                           ` Gu, Yang
2009-11-23  6:21                             ` Marcel Holtmann
2009-11-23 10:54                               ` Denis Kenzior [this message]
2009-11-23 16:08                                 ` Marcel Holtmann
2009-11-24 16:01                               ` Gu, Yang
2009-11-24 17:07                                 ` Marcel Holtmann

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=200911230454.36858.denkenz@gmail.com \
    --to=denkenz@gmail.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.