--------------------- PatchSet 11703 Date: 2007/09/24 13:07:25 Author: hno Branch: HEAD Tag: (none) Log: Correct syslog: logfile path parsing. Members: src/logfile_mod_syslog.c:1.2->1.3 Index: squid/src/logfile_mod_syslog.c =================================================================== RCS file: /cvsroot/squid/squid/src/logfile_mod_syslog.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- squid/src/logfile_mod_syslog.c 19 Sep 2007 21:14:16 -0000 1.2 +++ squid/src/logfile_mod_syslog.c 24 Sep 2007 13:07:25 -0000 1.3 @@ -1,5 +1,5 @@ /* - * $Id: logfile_mod_syslog.c,v 1.2 2007/09/19 21:14:16 hno Exp $ + * $Id: logfile_mod_syslog.c,v 1.3 2007/09/24 13:07:25 hno Exp $ * * DEBUG: section 50 Log file handling * AUTHOR: Duane Wessels @@ -163,8 +163,8 @@ ll = xcalloc(1, sizeof(*ll)); lf->data = ll; - if (path[6] != '\0') { - const char *priority = path + 7; + if (*path) { + char *priority = xstrdup(path); char *facility = (char *) strchr(priority, '.'); if (!facility) facility = (char *) strchr(priority, '|'); @@ -173,6 +173,7 @@ ll->syslog_priority |= syslog_ntoa(facility); } ll->syslog_priority |= syslog_ntoa(priority); + xfree(priority); } if ((ll->syslog_priority & PRIORITY_MASK) == 0) ll->syslog_priority |= LOG_INFO;