|
|
b1e7a3 |
diff --git a/src/dowall.c b/src/dowall.c
|
|
|
b1e7a3 |
index 85645c0..1bf4cb9 100644
|
|
|
b1e7a3 |
--- a/src/dowall.c
|
|
|
b1e7a3 |
+++ b/src/dowall.c
|
|
|
b1e7a3 |
@@ -156,7 +156,7 @@ void wall(const char *text, int remote)
|
|
|
b1e7a3 |
struct utmp *utmp;
|
|
|
b1e7a3 |
time_t t;
|
|
|
b1e7a3 |
char term[UT_LINESIZE+ strlen(_PATH_DEV) + 1];
|
|
|
b1e7a3 |
- char line[81];
|
|
|
b1e7a3 |
+ char message[401], line[411];
|
|
|
b1e7a3 |
char hostname[HOST_NAME_MAX+1];
|
|
|
b1e7a3 |
char *date, *p;
|
|
|
b1e7a3 |
char *user, *tty;
|
|
|
b1e7a3 |
@@ -189,15 +189,17 @@ void wall(const char *text, int remote)
|
|
|
b1e7a3 |
*p = 0;
|
|
|
b1e7a3 |
|
|
|
b1e7a3 |
if (remote) {
|
|
|
b1e7a3 |
- snprintf(line, sizeof(line),
|
|
|
b1e7a3 |
- "\007\r\nRemote broadcast message (%s):\r\n\r\n",
|
|
|
b1e7a3 |
+ snprintf(message, sizeof(message),
|
|
|
b1e7a3 |
+ "Remote broadcast message (%s):",
|
|
|
b1e7a3 |
date);
|
|
|
b1e7a3 |
} else {
|
|
|
b1e7a3 |
- snprintf(line, sizeof(line),
|
|
|
b1e7a3 |
- "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
|
|
|
b1e7a3 |
+ snprintf(message, sizeof(message),
|
|
|
b1e7a3 |
+ "Broadcast message from %s@%s %s(%s):",
|
|
|
b1e7a3 |
user, hostname, tty, date);
|
|
|
b1e7a3 |
}
|
|
|
b1e7a3 |
|
|
|
b1e7a3 |
+ snprintf(line, sizeof(line), "\007\r\n%s\r\n\r\n", message);
|
|
|
b1e7a3 |
+
|
|
|
b1e7a3 |
/*
|
|
|
b1e7a3 |
* Fork to avoid us hanging in a write()
|
|
|
b1e7a3 |
*/
|