-/* $OpenBSD: cmd-queue.c,v 1.26 2015/09/16 22:41:00 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.27 2015/10/20 21:12:08 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
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)
-/* $OpenBSD: cmd-wait-for.c,v 1.9 2015/09/13 10:45:55 nicm Exp $ */
+/* $OpenBSD: cmd-wait-for.c,v 1.10 2015/10/20 21:12:08 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
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++;
-/* $OpenBSD: server-client.c,v 1.156 2015/10/20 14:19:27 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.157 2015/10/20 21:12:09 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
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. */
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
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)
{
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);
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:
-/* $OpenBSD: server-fn.c,v 1.88 2015/09/10 08:58:14 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.89 2015/10/20 21:12:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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)
-/* $OpenBSD: status.c,v 1.135 2015/09/14 10:25:52 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.136 2015/10/20 21:12:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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. */