mirror of git://git.sysmocom.de/ofono
gatchat: Fix parsing fields with odd number of quotation marks
Events like +CLCC and +CCWA can have contact name attached to the end of line. If this field contains odd number of quotation marks, parser will eventually reject such message as malformatted.
This commit is contained in:
parent
f750366261
commit
5a6fe84ec0
|
@ -309,6 +309,12 @@ static GAtSyntaxResult gsm_permissive_feed(GAtSyntax *syntax,
|
||||||
case GSM_PERMISSIVE_STATE_RESPONSE_STRING:
|
case GSM_PERMISSIVE_STATE_RESPONSE_STRING:
|
||||||
if (byte == '"')
|
if (byte == '"')
|
||||||
syntax->state = GSM_PERMISSIVE_STATE_RESPONSE;
|
syntax->state = GSM_PERMISSIVE_STATE_RESPONSE;
|
||||||
|
else if (byte == '\r') {
|
||||||
|
syntax->state = GSM_PERMISSIVE_STATE_IDLE;
|
||||||
|
i += 1;
|
||||||
|
res = G_AT_SYNTAX_RESULT_LINE;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GSM_PERMISSIVE_STATE_GUESS_PDU:
|
case GSM_PERMISSIVE_STATE_GUESS_PDU:
|
||||||
|
|
Loading…
Reference in New Issue