diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-03-25 11:35:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2013-03-25 11:35:55 +0000 |
commit | 8a40e10d55d5ebedb079ef96aa2619ecf9b45988 (patch) | |
tree | 248d3d8465ee5b94b2e0d6a15e70cb7e46733eac /control.c | |
parent | e0961dfdf4e0f87d002771144d74a67ffc21945a (diff) | |
download | rtmux-8a40e10d55d5ebedb079ef96aa2619ecf9b45988.tar.gz rtmux-8a40e10d55d5ebedb079ef96aa2619ecf9b45988.tar.bz2 rtmux-8a40e10d55d5ebedb079ef96aa2619ecf9b45988.zip |
Add time and a command count to control mode guards, based on code from
George Nachman.
Diffstat (limited to 'control.c')
-rw-r--r-- | control.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -68,8 +68,13 @@ control_callback(struct client *c, int closed, unused void *data) } if (cmd_string_parse(line, &cmdlist, NULL, 0, &cause) != 0) { - control_write(c, "%%error in line \"%s\": %s", line, - cause); + c->cmdq->time = time(NULL); + c->cmdq->number++; + + cmdq_guard(c->cmdq, "begin"); + control_write(c, "parse error: %s", cause); + cmdq_guard(c->cmdq, "error"); + free(cause); } else { cmdq_run(c->cmdq, cmdlist); |