# HG changeset patch # User carl # Date 1127451428 25200 # Node ID 91c27c00048f172b15c423ac88cb7d380ba99740 # Parent cc3b79349c9cd130ffcae9169399a9de08388260 tokenizer errors now go thru syslog to be visible during config file reloads in normal operation diff -r cc3b79349c9c -r 91c27c00048f ChangeLog --- a/ChangeLog Wed Sep 21 13:29:28 2005 -0700 +++ b/ChangeLog Thu Sep 22 21:57:08 2005 -0700 @@ -1,5 +1,9 @@ $Id$ +5.6 2005-09-22 + Tokenizer errors now go thru the syslog code, so they are visible + when generated during config file reloads during normal operation. + 5.5 2005-09-21 Cleanup debug logging. Verify from/to pairs now remembers the last from value sent to the remote server to prevent unnecessary rset diff -r cc3b79349c9c -r 91c27c00048f dnsbl.spec.in --- a/dnsbl.spec.in Wed Sep 21 13:29:28 2005 -0700 +++ b/dnsbl.spec.in Thu Sep 22 21:57:08 2005 -0700 @@ -1,6 +1,6 @@ Summary: DNSBL Sendmail Milter Name: dnsbl -Version: 5.5 +Version: 5.6 Release: 2 Copyright: GPL Group: System Environment/Daemons diff -r cc3b79349c9c -r 91c27c00048f package.bash --- a/package.bash Wed Sep 21 13:29:28 2005 -0700 +++ b/package.bash Thu Sep 22 21:57:08 2005 -0700 @@ -1,6 +1,6 @@ #!/bin/bash -VER=dnsbl-5.5 +VER=dnsbl-5.6 mkdir $VER target1=/home/httpd/html/510sg/util/dnsbl.tar.gz target2=/home/httpd/html/510sg/dnsbl.conf diff -r cc3b79349c9c -r 91c27c00048f src/tokenizer.cpp --- a/src/tokenizer.cpp Wed Sep 21 13:29:28 2005 -0700 +++ b/src/tokenizer.cpp Thu Sep 22 21:57:08 2005 -0700 @@ -6,10 +6,12 @@ */ -#include "dnsbl.h" +#include "includes.h" static char* tokenizer_version="$Id$"; +const int maxlen = 1000; // used for snprintf buffers + enum state {s_init, s_token, s_string, @@ -342,13 +344,13 @@ bool TOKEN::include(char *fn) { string_set::iterator i = filenamess.find(fn); if (i != filenamess.end()) { - my_syslog("redundant or recursive include file detected"); + token_error("redundant or recursive include file detected"); return false; } ifstream *is = new ifstream; is->open(fn); if (is->fail()) { - char buf[1000]; + char buf[maxlen]; snprintf(buf, sizeof(buf), "include file %s not found", fn); token_error(buf); return false; @@ -486,18 +488,24 @@ void TOKEN::token_error(const char *err) { token_error(); - printf("%s \n", err); + char buf[maxlen]; + snprintf(buf, sizeof(buf), "%s \n", err); + my_syslog(buf); } void TOKEN::token_error(const char *fmt, int d, const char *s) { - printf(fmt, d, s); + char buf[maxlen]; + snprintf(buf, sizeof(buf), fmt, d, s); + my_syslog(buf); } void TOKEN::token_error(const char *fmt, const char *t, const char *h) { if (!h) h = "null"; - printf(fmt, t, h); + char buf[maxlen]; + snprintf(buf, sizeof(buf), fmt, t, h); + my_syslog(buf); } diff -r cc3b79349c9c -r 91c27c00048f xml/dnsbl.in --- a/xml/dnsbl.in Wed Sep 21 13:29:28 2005 -0700 +++ b/xml/dnsbl.in Thu Sep 22 21:57:08 2005 -0700 @@ -2,7 +2,7 @@ -DNSBL Sendmail milter - Version 5.5 +DNSBL Sendmail milter - Version 5.6
Introduction