summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/server-fn.c b/server-fn.c
index d11fda16..1aa6537a 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.76 2009-07-20 16:07:23 tcunha Exp $ */
+/* $Id: server-fn.c,v 1.77 2009-07-28 22:12:16 tcunha 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';