From 103748d6adfe1b2d706cb0a1e1a128be5366d655 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 6 Dec 2007 09:46:23 +0000 Subject: Major reorganisation of screen handling. --- server-msg.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'server-msg.c') diff --git a/server-msg.c b/server-msg.c index a9f77bc2..fec44099 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,5 +1,5 @@ -/* $Id: server-msg.c,v 1.39 2007-11-27 20:01:30 nicm Exp $ */ +/* $Id: server-msg.c,v 1.40 2007-12-06 09:46:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -38,7 +38,7 @@ void printflike2 server_msg_fn_command_print( struct server_msg { enum hdrtype type; - + int (*fn)(struct hdr *, struct client *); }; const struct server_msg server_msg_table[] = { @@ -64,7 +64,7 @@ server_msg_dispatch(struct client *c) if (BUFFER_USED(c->in) < (sizeof hdr) + hdr.size) return (0); buffer_remove(c->in, sizeof hdr); - + for (i = 0; i < NSERVERMSG; i++) { msg = server_msg_table + i; if (msg->type == hdr.type) { @@ -72,7 +72,7 @@ server_msg_dispatch(struct client *c) return (n); break; } - } + } if (i == NSERVERMSG) fatalx("unexpected message"); } @@ -120,7 +120,7 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) if (hdr->size < sizeof data) fatalx("bad MSG_COMMAND size"); buffer_read(c->in, &data, sizeof data); - name = cmd_recv_string(c->in); + name = cmd_recv_string(c->in); client = cmd_recv_string(c->in); cmd = cmd_recv(c->in); @@ -147,7 +147,7 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) } } else { if (client == NULL) { - server_msg_fn_command_error(&ctx, + server_msg_fn_command_error(&ctx, "%s: must specify a client", cmd->entry->name); goto out; } @@ -167,7 +167,7 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) ctx.session = NULL; if (cmd->entry->flags & CMD_NOSESSION) { if (name != NULL) { - server_msg_fn_command_error(&ctx, + server_msg_fn_command_error(&ctx, "%s: cannot specify a session", cmd->entry->name); goto out; } @@ -179,7 +179,7 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) xfree(cause); goto out; } - } + } cmd_exec(cmd, &ctx); cmd_free(cmd); -- cgit