diff options
Diffstat (limited to 'gatchat/gatchat.c')
-rw-r--r-- | gatchat/gatchat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index 3c21e068..616f843a 100644 --- a/gatchat/gatchat.c +++ b/gatchat/gatchat.c @@ -675,7 +675,15 @@ static void new_bytes(GAtChat *p) len -= p->read_so_far; wrap -= p->read_so_far; - have_pdu(p); + /* Some modems like the TI Calypso send a CMT style + * notification with an extra CRLF thrown in + */ + if ((p->flags & G_AT_CHAT_FLAG_EXTRA_PDU_CRLF) && + p->read_so_far == 2) { + p->state = PARSER_STATE_PDU; + ring_buffer_drain(p->buf, p->read_so_far); + } else + have_pdu(p); p->read_so_far = 0; } else if (p->state == PARSER_STATE_INITIAL_CR) { |