diff options
| author | Robert Griebl <griebl@gmx.de> | 2002-07-19 20:52:21 +0000 |
|---|---|---|
| committer | Robert Griebl <griebl@gmx.de> | 2002-07-19 20:52:21 +0000 |
| commit | fc78b795758ad04caeadfbb2bbb75e6cefa03785 (patch) | |
| tree | e5033fb9ba1ae0b24582730f66bce03fb64da529 /sysklogd | |
| parent | efd4983eb1e6a196bc9d20b0b8840b79cb0f308c (diff) | |
| download | busybox-w32-fc78b795758ad04caeadfbb2bbb75e6cefa03785.tar.gz busybox-w32-fc78b795758ad04caeadfbb2bbb75e6cefa03785.tar.bz2 busybox-w32-fc78b795758ad04caeadfbb2bbb75e6cefa03785.zip | |
Applied syslogd fix submitted by Bart Visscher:
I am using BB 0.60.2 in a floppy distro, and the syslog (and logger) is
unable to log the "<" char. This shows up in ppp logfiles. [...]
#logger "<pcomp>" results in "comp>" arriving at the log.
Diffstat (limited to 'sysklogd')
| -rw-r--r-- | sysklogd/syslogd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index e1e71378c..3c18c507f 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
| @@ -411,14 +411,16 @@ static int serveConnection (int conn) | |||
| 411 | int pri = (LOG_USER | LOG_NOTICE); | 411 | int pri = (LOG_USER | LOG_NOTICE); |
| 412 | char line[ BUFSIZE + 1 ]; | 412 | char line[ BUFSIZE + 1 ]; |
| 413 | unsigned char c; | 413 | unsigned char c; |
| 414 | int gotpri = 0; | ||
| 414 | 415 | ||
| 415 | char *q = line; | 416 | char *q = line; |
| 416 | 417 | ||
| 417 | tmpbuf[ n_read - 1 ] = '\0'; | 418 | tmpbuf[ n_read - 1 ] = '\0'; |
| 418 | 419 | ||
| 419 | while (p && (c = *p) && q < &line[ sizeof (line) - 1 ]) { | 420 | while (p && (c = *p) && q < &line[ sizeof (line) - 1 ]) { |
| 420 | if (c == '<') { | 421 | if ((c == '<') && !gotpri && isdigit(p[1])) { |
| 421 | /* Parse the magic priority number. */ | 422 | /* Parse the magic priority number. */ |
| 423 | gotpri = 1; | ||
| 422 | pri = 0; | 424 | pri = 0; |
| 423 | while (isdigit (*(++p))) { | 425 | while (isdigit (*(++p))) { |
| 424 | pri = 10 * pri + (*p - '0'); | 426 | pri = 10 * pri + (*p - '0'); |
