diff options
author | Matt Kraai | 2001-08-14 17:32:23 +0000 |
---|---|---|
committer | Matt Kraai | 2001-08-14 17:32:23 +0000 |
commit | b6ec78161ddb081315ef468bd245fcd9f6c5f8df (patch) | |
tree | fc771cbcf7ed280db9158485eb51869e90c32846 /syslogd.c | |
parent | 0a6859031493951de02cc00e18f0da2bd305fc05 (diff) | |
download | busybox-b6ec78161ddb081315ef468bd245fcd9f6c5f8df.zip busybox-b6ec78161ddb081315ef468bd245fcd9f6c5f8df.tar.gz |
Log all messages from a single connection, not just the first. Patch from
matthias@corelatus.com, approved by Gennady Feldman <gena01@cachier.com>.
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -394,16 +394,17 @@ static int serveConnection (int conn) { RESERVE_BB_BUFFER(tmpbuf, BUFSIZE + 1); int n_read; + char *p = tmpbuf; n_read = read (conn, tmpbuf, BUFSIZE ); - if (n_read > 0) { + while (p < tmpbuf + n_read) { int pri = (LOG_USER | LOG_NOTICE); char line[ BUFSIZE + 1 ]; unsigned char c; - char *p = tmpbuf, *q = line; + char *q = line; tmpbuf[ n_read - 1 ] = '\0'; @@ -428,6 +429,7 @@ static int serveConnection (int conn) p++; } *q = '\0'; + p++; /* Now log it */ logMessage (pri, line); } |