=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-fn.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/tmux/server-fn.c 2009/07/20 14:37:51 1.9 --- src/usr.bin/tmux/server-fn.c 2009/07/26 12:58:44 1.10 *************** *** 1,4 **** ! /* $OpenBSD: server-fn.c,v 1.9 2009/07/20 14:37:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-fn.c,v 1.10 2009/07/26 12:58:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 48,53 **** --- 48,62 ---- } 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,226 **** password_failures++; for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c = ARRAY_ITEM(&clients, i); ! if (c == NULL || c->prompt_buffer == NULL) continue; *c->prompt_buffer = '\0'; --- 229,235 ---- password_failures++; for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c = ARRAY_ITEM(&clients, i); ! if (c == NULL || c->prompt_buffer == NULL) continue; *c->prompt_buffer = '\0';