Patch on unsupported AT command

Denis Kenzior denkenz at gmail.com
Mon Nov 23 02:54:36 PST 2009


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


More information about the ofono mailing list