summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server-fn.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/server-fn.c')
-rw-r--r--usr.bin/tmux/server-fn.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index 8beef15e7e3..22ba7eeefa6 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.9 2009/07/20 14:37:51 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.10 2009/07/26 12:58:44 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -48,6 +48,15 @@ server_fill_environ(struct session *s)
}
void
+server_write_error(struct client *c, const char *msg)
+{
+ struct msg_print_data printdata;
+
+ strlcpy(printdata.msg, msg, sizeof printdata.msg);
+ server_write_client(c, MSG_ERROR, &printdata, sizeof printdata);
+}
+
+void
server_write_client(
struct client *c, enum hdrtype type, const void *buf, size_t len)
{
@@ -220,7 +229,7 @@ wrong:
password_failures++;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
c = ARRAY_ITEM(&clients, i);
- if (c == NULL || c->prompt_buffer == NULL)
+ if (c == NULL || c->prompt_buffer == NULL)
continue;
*c->prompt_buffer = '\0';