commit 511402f69236883811b5e9cdef60735cf7f6d46a
parent 8f63cb3dd596654952c5b7efb8d0d93d32721e12
Author: Gerrit Pape <pape@smarden.org>
Date: Mon, 11 Jul 2005 11:53:46 +0000
* svlogd.c: write to log dir after possibly writing through udp (fixes
line break issue).
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/package/CHANGES b/package/CHANGES
@@ -4,6 +4,8 @@
add contributed run scripts (thx Sascha Huedepohl); typos.
* runsvchdir.c, runsvstat.c: optimize output buffer handling.
* runsvctrl.c: write x control character to runsv on e.
+ * svlogd.c: write to log dir after possibly writing through udp (fixes
+ line break issue).
runit 1.2.3
Mon, 18 Apr 2005 17:08:35 +0000
diff --git a/src/svlogd.c b/src/svlogd.c
@@ -766,10 +766,6 @@ int main(int argc, const char **argv) {
buffer_put(buffer_2, "\n", 1); buffer_flush(buffer_2);
}
if (dir[i].match != '+') continue;
- if (! dir[i].udponly) {
- if (timestamp) buffer_puts(&dir[i].b, stamp);
- buffer_put(&dir[i].b, line, linelen);
- }
if (dir[i].udpaddr.sin_port != 0) {
if (fdudp == -1) {
buffer_puts(&dir[i].b, "warning: no udp socket available: ");
@@ -793,6 +789,10 @@ int main(int argc, const char **argv) {
}
}
}
+ if (! dir[i].udponly) {
+ if (timestamp) buffer_puts(&dir[i].b, stamp);
+ buffer_put(&dir[i].b, line, linelen);
+ }
}
if (linelen == linemax)
for (;;) {