From 384dd57ca3a1c8c4b498bae0a60f7d379e49096e Mon Sep 17 00:00:00 2001 From: arjen Date: Fri, 20 Dec 2002 17:42:34 +0000 Subject: [PATCH] BUGFIX: The hostname in a system log may contain digits as well as letters --- src/gcm_input/message.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gcm_input/message.cpp b/src/gcm_input/message.cpp index 282df52..dac561a 100644 --- a/src/gcm_input/message.cpp +++ b/src/gcm_input/message.cpp @@ -8,7 +8,7 @@ *********************** ** FILE NAME : message.cpp ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring -** VERSION NUMBER : $Revision: 1.4 $ +** VERSION NUMBER : $Revision: 1.5 $ ** ** DESCRIPTION : Implementation of the message handling classes ** @@ -20,13 +20,16 @@ ******************************** ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl ** CREATION DATE : Sep 16, 2002 -** LAST UPDATE : Nov 29, 2002 +** LAST UPDATE : Dec 20, 2002 ** MODIFICATIONS : **************************************************************************/ /***************************** $Log: message.cpp,v $ - Revision 1.4 2002-12-06 22:26:28 arjen + Revision 1.5 2002-12-20 17:42:34 arjen + BUGFIX: The hostname in a system log may contain digits as well as letters + + Revision 1.4 2002/12/06 22:26:28 arjen Set the value of log.processed to FALSE when inserting a new log entry into the database When a syslog entry arrives from last year, gcm_input subtracts one from the @@ -44,7 +47,7 @@ *****************************/ -static const char *RCSID = "$Id: message.cpp,v 1.4 2002-12-06 22:26:28 arjen Exp $"; +static const char *RCSID = "$Id: message.cpp,v 1.5 2002-12-20 17:42:34 arjen Exp $"; #include "message.h" @@ -114,7 +117,7 @@ static const String syslog_date_re("[[:alpha:]]{3} [ 123][0-9] [0-9]{2}:[0-9]{2} static const String mail_date_re("[[:alpha:]]{3}, [ 123]?[0-9] [[:alpha:]]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} [+-][0-9]{4}"); static const String unix_date_re("[[:alpha:]]{3} [[:alpha:]]{3} [ 123][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4}"); -static const regex re_syslog(syslog_date_re + " [a-z]+ [[:alpha:]]+.*:.+"); +static const regex re_syslog(syslog_date_re + " [[:alnum:]]+ [[:alpha:]]+.*:.+"); static const regex re_PGP("-----BEGIN PGP MESSAGE-----"); static const regex re_dump("^ *DUMP: Date of this level"); static const regex re_accesslog("(GET|POST) .+ HTTP"); -- 2.11.0