summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-09-29 13:22:15 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-09-29 13:22:15 +0000
commit653ee721df4b0464803d6cba46376b4fcbd09b82 (patch)
tree01473c0ff6aed723ac74af38073e5bf400e8ec2b /server-fn.c
parenta6875d0dae0f656fe25df9380a0b3fd115edb454 (diff)
Write error messages for rename. Also tweak some error outputs, and fix -i.
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/server-fn.c b/server-fn.c
index df44983c..598632b2 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.7 2007-09-29 09:53:25 nicm Exp $ */
+/* $Id: server-fn.c,v 1.8 2007-09-29 13:22:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -172,6 +172,20 @@ server_draw_client(struct client *c, u_int py_upper, u_int py_lower)
buffer_reverse_add(c->out, sizeof hdr);
}
+/* Send error message command to client. */
+void
+server_write_error(struct client *c, const char *fmt, ...)
+{
+ va_list ap;
+ char *msg;
+
+ va_start(ap, fmt);
+ xvasprintf(&msg, fmt, ap);
+ va_end(ap);
+
+ server_write_client(c, MSG_ERROR, msg, strlen(msg));
+ xfree(msg);
+}
/* Write message command to a client. */
void