projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f633664
)
Fixes to parser state when command prompt is used
author
Denis Kenzior
<denkenz@gmail.com>
Sat, 20 Jun 2009 02:10:51 +0000
(21:10 -0500)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 30 Jun 2009 19:44:24 +0000
(12:44 -0700)
gatchat/gatchat.c
patch
|
blob
|
history
diff --git
a/gatchat/gatchat.c
b/gatchat/gatchat.c
index
0a37372
..
b400157
100644
(file)
--- a/
gatchat/gatchat.c
+++ b/
gatchat/gatchat.c
@@
-606,13
+606,14
@@
static inline void parse_char(GAtChat *chat, char byte)
chat->state = PARSER_STATE_PROMPT_COMPLETE;
else
chat->state = PARSER_STATE_RESPONSE;
+ break;
case PARSER_STATE_RESPONSE_COMPLETE:
case PARSER_STATE_PDU_COMPLETE:
case PARSER_STATE_MULTILINE_COMPLETE:
default:
/* This really shouldn't happen */
- assert(
TRU
E);
+ assert(
FALS
E);
return;
}
}
@@
-678,6
+679,8
@@
static void new_bytes(GAtChat *p)
ring_buffer_drain(p->buf, p->read_so_far);
p->read_so_far = 0;
+
+ p->state = PARSER_STATE_IDLE;
}
}