mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
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.
This commit is contained in:
parent
efd4983eb1
commit
fc78b79575
@ -411,14 +411,16 @@ static int serveConnection (int conn)
|
||||
int pri = (LOG_USER | LOG_NOTICE);
|
||||
char line[ BUFSIZE + 1 ];
|
||||
unsigned char c;
|
||||
int gotpri = 0;
|
||||
|
||||
char *q = line;
|
||||
|
||||
tmpbuf[ n_read - 1 ] = '\0';
|
||||
|
||||
while (p && (c = *p) && q < &line[ sizeof (line) - 1 ]) {
|
||||
if (c == '<') {
|
||||
if ((c == '<') && !gotpri && isdigit(p[1])) {
|
||||
/* Parse the magic priority number. */
|
||||
gotpri = 1;
|
||||
pri = 0;
|
||||
while (isdigit (*(++p))) {
|
||||
pri = 10 * pri + (*p - '0');
|
||||
|
Loading…
Reference in New Issue
Block a user