diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 11:52:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 11:52:03 +0000 |
commit | 68a5d5c00be0e0445e72c2e960588d21c4494467 (patch) | |
tree | fa6e1bf24e1287633ff08a41d45d2c7f1e8ed24d /server-msg.c | |
parent | ff56ed7bd66f9be56f525838c21695a8574c1a09 (diff) |
Window attachment, malloc debugging, fix a segfault with no sessions.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server-msg.c b/server-msg.c index 3352970a..ac67002d 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.22 2007-10-04 00:02:10 nicm Exp $ */ +/* $Id: server-msg.c,v 1.23 2007-10-04 11:52:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -118,6 +118,12 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) log_debug("got command %u %s from client %d", cmd->entry->type, cmd->entry->name, c->fd); + ctx.error = server_msg_fn_command_error; + ctx.print = server_msg_fn_command_print; + + ctx.client = c; + ctx.flags = 0; + if (cmd->entry->flags & CMD_NOSESSION) ctx.session = NULL; else { @@ -129,12 +135,6 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) } } - ctx.error = server_msg_fn_command_error; - ctx.print = server_msg_fn_command_print; - - ctx.client = c; - ctx.flags = 0; - cmd_exec(cmd, &ctx); cmd_free(cmd); |