***********************
** FILE NAME : message.cpp
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.14 $
+** VERSION NUMBER : $Revision: 1.15 $
**
** DESCRIPTION : Implementation of the message handling classes
**
/*****************************
$Log: message.cpp,v $
- Revision 1.14 2003-09-01 06:57:14 arjen
+ Revision 1.15 2003-10-27 11:28:27 arjen
+ Do not add another parameter_notification record is the notification
+ already exists for that parameter.
+
+ Revision 1.14 2003/09/01 06:57:14 arjen
Reject log entries that are found to be invalid.
Revision 1.13 2003/08/16 15:28:45 arjen
*****************************/
-static const char *RCSID = "$Id: message.cpp,v 1.14 2003-09-01 06:57:14 arjen Exp $";
+static const char *RCSID = "$Id: message.cpp,v 1.15 2003-10-27 11:28:27 arjen Exp $";
#include <algorithm>
#include <libxml/xpath.h>
{
remark = "Gnucomo detected a different version for package parameter(s) ";
change_notification = database.new_notification(objectid, "property modified", remark);
+ change_notification = database.new_notification(objectid, "property modified", remark);
}
if (change_notification != "")
{
- insertion = "insert into parameter_notification (notificationid, paramid) values ('";
- insertion += change_notification + "', '";
- insertion += paramid + "')";
+ qry = "select * from parameter_notification where notificationid='";
+ qry += change_notification + "' and paramid='";
+ qry += paramid + "'";
- database.Query(insertion);
+ if (database.Query(qry) == 0)
+ {
+ insertion = "insert into parameter_notification (notificationid, paramid) values ('";
+ insertion += change_notification + "', '";
+ insertion += paramid + "')";
+
+ database.Query(insertion);
+ }
}
else
{