diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-29 13:22:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-29 13:22:15 +0000 |
commit | 653ee721df4b0464803d6cba46376b4fcbd09b82 (patch) | |
tree | 01473c0ff6aed723ac74af38073e5bf400e8ec2b /server-fn.c | |
parent | a6875d0dae0f656fe25df9380a0b3fd115edb454 (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.c | 16 |
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 |