diff options
author | 2014-10-21 22:06:46 +0000 | |
---|---|---|
committer | 2014-10-21 22:06:46 +0000 | |
commit | a236dc56d42c9fca63527c72962986866b7fa061 (patch) | |
tree | 43542267c7358632bce000acb72003b7bc945009 /usr.bin/tmux/cmd-queue.c | |
parent | Rework the error message a little bit: Do not send details of the (diff) | |
download | wireguard-openbsd-a236dc56d42c9fca63527c72962986866b7fa061.tar.xz wireguard-openbsd-a236dc56d42c9fca63527c72962986866b7fa061.zip |
Save next item after firing command in case it has added to the queue.
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index 9200f208cc3..5c331e6c678 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.18 2014/10/20 23:57:13 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.19 2014/10/21 22:06:46 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net> @@ -180,8 +180,6 @@ cmdq_continue(struct cmd_q *cmdq) cmdq->cmd = TAILQ_NEXT(cmdq->cmd, qentry); do { - next = TAILQ_NEXT(cmdq->item, qentry); - while (cmdq->cmd != NULL) { cmd_print(cmdq->cmd, s, sizeof s); log_debug("cmdq %p: %s (client %d)", cmdq, s, @@ -213,6 +211,7 @@ cmdq_continue(struct cmd_q *cmdq) cmdq->cmd = TAILQ_NEXT(cmdq->cmd, qentry); } + next = TAILQ_NEXT(cmdq->item, qentry); TAILQ_REMOVE(&cmdq->queue, cmdq->item, qentry); cmd_list_free(cmdq->item->cmdlist); |