summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-11-27 20:03:08 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-11-27 20:03:08 +0000
commit7034ba236f4cbb94753f23747e363644a932221e (patch)
tree75781655cff60e52599795e80a3f2a679aca002c
parent5cd1d459c5351774dbcda51911278d781384bf0f (diff)
Same exit process applied to detach.
-rw-r--r--client-msg.c22
-rw-r--r--tmux.h4
2 files changed, 13 insertions, 13 deletions
diff --git a/client-msg.c b/client-msg.c
index b90488a1..878bbcd0 100644
--- a/client-msg.c
+++ b/client-msg.c
@@ -1,4 +1,4 @@
-/* $Id: client-msg.c,v 1.12 2007-11-27 20:01:30 nicm Exp $ */
+/* $Id: client-msg.c,v 1.13 2007-11-27 20:03:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -84,37 +84,37 @@ client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx, char **error)
}
int
-client_msg_fn_exit(
+client_msg_fn_detach(
struct hdr *hdr, unused struct client_ctx *cctx, unused char **error)
{
if (hdr->size != 0)
- fatalx("bad MSG_EXIT size");
+ fatalx("bad MSG_DETACH size");
client_write_server(cctx, MSG_EXITING, NULL, 0);
-
+ cctx->flags |= CCTX_DETACH;
+
return (0);
}
int
-client_msg_fn_exited(
+client_msg_fn_exit(
struct hdr *hdr, unused struct client_ctx *cctx, unused char **error)
{
if (hdr->size != 0)
- fatalx("bad MSG_EXITED size");
+ fatalx("bad MSG_EXIT size");
+ client_write_server(cctx, MSG_EXITING, NULL, 0);
cctx->flags |= CCTX_EXIT;
- return (-1);
+ return (0);
}
int
-client_msg_fn_detach(
+client_msg_fn_exited(
struct hdr *hdr, unused struct client_ctx *cctx, unused char **error)
{
if (hdr->size != 0)
- fatalx("bad MSG_DETACH size");
-
- cctx->flags |= CCTX_DETACH;
+ fatalx("bad MSG_EXITED size");
return (-1);
}
diff --git a/tmux.h b/tmux.h
index 2382a630..e45c3e41 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.103 2007-11-27 20:01:30 nicm Exp $ */
+/* $Id: tmux.h,v 1.104 2007-11-27 20:03:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -291,9 +291,9 @@ enum hdrtype {
MSG_EXIT,
MSG_EXITING,
MSG_EXITED,
+ MSG_DETACH,
MSG_IDENTIFY,
MSG_READY,
- MSG_DETACH,
MSG_RESIZE,
};