mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 13:54:54 +02:00
Rename cmd_q dead flag to a general flags bitmask (will be more flags later).
This commit is contained in:
@ -35,7 +35,7 @@ cmdq_new(struct client *c)
|
||||
|
||||
cmdq = xcalloc(1, sizeof *cmdq);
|
||||
cmdq->references = 1;
|
||||
cmdq->dead = 0;
|
||||
cmdq->flags = 0;
|
||||
|
||||
cmdq->client = c;
|
||||
cmdq->client_exit = -1;
|
||||
@ -51,8 +51,11 @@ cmdq_new(struct client *c)
|
||||
int
|
||||
cmdq_free(struct cmd_q *cmdq)
|
||||
{
|
||||
if (--cmdq->references != 0)
|
||||
return (cmdq->dead);
|
||||
if (--cmdq->references != 0) {
|
||||
if (cmdq->flags & CMD_Q_DEAD)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
cmdq_flush(cmdq);
|
||||
free(cmdq);
|
||||
|
Reference in New Issue
Block a user