Add Repeat last command support

This commit is contained in:
Zhenhua Zhang 2010-03-31 17:50:37 +08:00 committed by Denis Kenzior
parent 1390a63933
commit 5819927a38
1 changed files with 7 additions and 2 deletions

View File

@ -996,8 +996,13 @@ static void new_bytes(GAtServer *p)
}
case PARSER_RESULT_REPEAT_LAST:
/* TODO */
g_at_server_send_final(p, G_AT_SERVER_RESULT_ERROR);
p->cur_pos = 0;
if (p->last_line)
server_parse_line(p);
else
g_at_server_send_final(p,
G_AT_SERVER_RESULT_OK);
ring_buffer_drain(p->read_buf, p->read_so_far);
break;