summaryrefslogtreecommitdiffstats
path: root/client-msg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-04 11:52:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-04 11:52:03 +0000
commit68a5d5c00be0e0445e72c2e960588d21c4494467 (patch)
treefa6e1bf24e1287633ff08a41d45d2c7f1e8ed24d /client-msg.c
parentff56ed7bd66f9be56f525838c21695a8574c1a09 (diff)
Window attachment, malloc debugging, fix a segfault with no sessions.
Diffstat (limited to 'client-msg.c')
-rw-r--r--client-msg.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/client-msg.c b/client-msg.c
index 6bcd8173..bea15246 100644
--- a/client-msg.c
+++ b/client-msg.c
@@ -1,4 +1,4 @@
-/* $Id: client-msg.c,v 1.6 2007-10-03 21:31:07 nicm Exp $ */
+/* $Id: client-msg.c,v 1.7 2007-10-04 11:52:02 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -27,6 +27,7 @@
int client_msg_fn_data(struct hdr *, struct client_ctx *, char **);
int client_msg_fn_detach(struct hdr *, struct client_ctx *, char **);
int client_msg_fn_error(struct hdr *, struct client_ctx *, char **);
+int client_msg_fn_exit(struct hdr *, struct client_ctx *, char **);
int client_msg_fn_okay(struct hdr *, struct client_ctx *, char **);
int client_msg_fn_pause(struct hdr *, struct client_ctx *, char **);
@@ -39,6 +40,7 @@ struct client_msg client_msg_table[] = {
{ MSG_DATA, client_msg_fn_data },
{ MSG_DETACH, client_msg_fn_detach },
{ MSG_ERROR, client_msg_fn_error },
+ { MSG_EXIT, client_msg_fn_exit },
{ MSG_PAUSE, client_msg_fn_pause },
};
#define NCLIENTMSG (sizeof client_msg_table / sizeof client_msg_table[0])
@@ -103,6 +105,18 @@ client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx, char **error)
}
int
+client_msg_fn_exit(
+ struct hdr *hdr, unused struct client_ctx *cctx, char **error)
+{
+ if (hdr->size != 0)
+ fatalx("bad MSG_EXIT size");
+
+ *error = xstrdup("");
+
+ return (-1);
+}
+
+int
client_msg_fn_detach(
struct hdr *hdr, unused struct client_ctx *cctx, char **error)
{