***********************
** 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
**
********************************
** 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
*****************************/
-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"
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");