diff --git a/cmd-queue.c b/cmd-queue.c index 1fe34dce..ff8c69cb 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -203,8 +203,8 @@ cmdq_continue(struct cmd_q *cmdq) cmdq->references++; notify_disable(); - log_debug("continuing cmdq %p: flags=%#x, client=%d", cmdq, cmdq->flags, - c != NULL ? c->ibuf.fd : -1); + log_debug("continuing cmdq %p: flags %#x, client %p", cmdq, cmdq->flags, + c); empty = TAILQ_EMPTY(&cmdq->queue); if (empty) diff --git a/cmd-wait-for.c b/cmd-wait-for.c index e38ea8f1..79e0b55e 100644 --- a/cmd-wait-for.c +++ b/cmd-wait-for.c @@ -170,12 +170,11 @@ cmd_wait_for_wait(struct cmd_q *cmdq, const char *name, wc = cmd_wait_for_add(name); if (wc->woken) { - log_debug("wait channel %s already woken (client %d)", wc->name, - c->tty.fd); + log_debug("wait channel %s already woken (%p)", wc->name, c); cmd_wait_for_remove(wc); return (CMD_RETURN_NORMAL); } - log_debug("wait channel %s not woken (client %d)", wc->name, c->tty.fd); + log_debug("wait channel %s not woken (%p)", wc->name, c); TAILQ_INSERT_TAIL(&wc->waiters, cmdq, waitentry); cmdq->references++; diff --git a/server-client.c b/server-client.c index 389e0123..92816041 100644 --- a/server-client.c +++ b/server-client.c @@ -130,7 +130,7 @@ server_client_create(int fd) evtimer_set(&c->repeat_timer, server_client_repeat_timer, c); TAILQ_INSERT_TAIL(&clients, c, entry); - log_debug("new client %d", fd); + log_debug("new client %p", c); } /* Open client terminal if needed. */ @@ -171,7 +171,7 @@ server_client_lost(struct client *c) c->stdin_callback(c, 1, c->stdin_callback_data); TAILQ_REMOVE(&clients, c, entry); - log_debug("lost client %d", c->ibuf.fd); + log_debug("lost client %p", c); /* * If CLIENT_TERMINAL hasn't been set, then tty_init hasn't been called @@ -237,7 +237,7 @@ server_client_lost(struct client *c) void server_client_unref(struct client *c) { - log_debug("unref client %d (%d references)", c->ibuf.fd, c->references); + log_debug("unref client %p (%d references)", c, c->references); c->references--; if (c->references == 0) @@ -250,7 +250,7 @@ server_client_free(unused int fd, unused short events, void *arg) { struct client *c = arg; - log_debug("free client %d (%d references)", c->ibuf.fd, c->references); + log_debug("free client %p (%d references)", c, c->references); if (c->references == 0) free(c); @@ -1007,7 +1007,7 @@ server_client_msg_dispatch(struct client *c) continue; } - log_debug("got %u from client %d", imsg.hdr.type, c->ibuf.fd); + log_debug("got %u from client %p", imsg.hdr.type, c); switch (imsg.hdr.type) { case MSG_IDENTIFY_FLAGS: case MSG_IDENTIFY_TERM: diff --git a/server-fn.c b/server-fn.c index bc2b7002..8a81da16 100644 --- a/server-fn.c +++ b/server-fn.c @@ -64,7 +64,7 @@ server_write_client(struct client *c, enum msgtype type, const void *buf, if (c->flags & CLIENT_BAD) return (-1); - log_debug("writing %d to client %d", type, c->ibuf.fd); + log_debug("writing %d to client %p", type, c); error = imsg_compose(ibuf, type, PROTOCOL_VERSION, -1, -1, (void *) buf, len); if (error == 1) diff --git a/status.c b/status.c index 7a1d2818..e17c1f5d 100644 --- a/status.c +++ b/status.c @@ -164,7 +164,7 @@ status_timer_callback(unused int fd, unused short events, void *arg) if (tv.tv_sec != 0) evtimer_add(&c->status_timer, &tv); - log_debug("client %d, status interval %d", c->ibuf.fd, (int)tv.tv_sec); + log_debug("client %p, status interval %d", c, (int)tv.tv_sec); } /* Start status timer for client. */