X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fconfig%2Freports-config.c;h=22a4832198e204398b3e759d28d66319d4f11932;hp=2f5ce6615c4eb76391c09b2a21d63b90c83e86dd;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/config/reports-config.c b/src/config/reports-config.c index 2f5ce66..22a4832 100644 --- a/src/config/reports-config.c +++ b/src/config/reports-config.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/config/reports-config.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. @@ -66,7 +67,7 @@ int Read_CReports(XML_NODE node, void *config, void *config2) monitor_config *mon_config = (monitor_config *)config; - + /* Getting any configured entry. */ if(mon_config->reports) { @@ -74,9 +75,9 @@ int Read_CReports(XML_NODE node, void *config, void *config2) s++; } - + /* Allocating the memory for the config. */ - os_realloc(mon_config->reports, (s + 2) * sizeof(report_config *), + os_realloc(mon_config->reports, (s + 2) * sizeof(report_config *), mon_config->reports); os_calloc(1, sizeof(report_config), mon_config->reports[s]); mon_config->reports[s + 1] = NULL; @@ -105,7 +106,7 @@ int Read_CReports(XML_NODE node, void *config, void *config2) mon_config->reports[s]->r_filter.show_alerts = 0; - + /* Reading the XML. */ while(node[i]) { @@ -203,7 +204,7 @@ int Read_CReports(XML_NODE node, void *config, void *config2) os_strdup(node[i]->content, ncat); - if(os_report_configfilter(node[i]->element, ncat, + if(os_report_configfilter(node[i]->element, ncat, &mon_config->reports[s]->r_filter, reportf) < 0) { merror("%s: Invalid filter: %s:%s (ignored).", __local_name, node[i]->element, node[i]->content); @@ -230,7 +231,7 @@ int Read_CReports(XML_NODE node, void *config, void *config2) if(mon_config->reports[s]->title) merror("%s: No \"email to\" configured for the report '%s'. Ignoring it.", __local_name, mon_config->reports[s]->title); else - merror("%s: No \"email to\" and title configured for report. Ignoring it.", __local_name); + merror("%s: No \"email to\" and title configured for report. Ignoring it.", __local_name); } if(!mon_config->reports[s]->title)