diff options
author | nicm <nicm> | 2014-10-21 22:06:46 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-10-21 22:06:46 +0000 |
commit | 85671a5bed961b7a542ffce853749fb61b0558ca (patch) | |
tree | 653118481a3448e18d3dcdc70302a39dc74ceb84 /cmd-queue.c | |
parent | 0a1a88d63caf3a0e8b4440686e73e1f0f690e03c (diff) | |
download | rtmux-85671a5bed961b7a542ffce853749fb61b0558ca.tar.gz rtmux-85671a5bed961b7a542ffce853749fb61b0558ca.tar.bz2 rtmux-85671a5bed961b7a542ffce853749fb61b0558ca.zip |
Save next item after firing command in case it has added to the queue.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 6495d3fd..0ddf90f7 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -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); |