Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions src/config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static int read_main_elements(const OS_XML *xml, int modules,
const char *osremote = "remote"; /* Agent Config */
const char *osclient = "client"; /* Agent Config */
const char *oscommand = "command"; /* ? Config */
const char *osreports = "reports"; /* Server Config */
const char *osactive_response = "active-response"; /* Agent Config */

while (node[i]) {
Expand Down Expand Up @@ -113,10 +112,6 @@ static int read_main_elements(const OS_XML *xml, int modules,
if ((modules & CAR) && (ReadActiveResponses(chld_node, d1, d2) < 0)) {
goto fail;
}
} else if (strcmp(node[i]->element, osreports) == 0) {
if ((modules & CREPORTS) && (Read_CReports(chld_node, d1, d2) < 0)) {
goto fail;
}
} else {
merror(XML_INVELEM, __local_name, node[i]->element);
goto fail;
Expand Down Expand Up @@ -154,16 +149,17 @@ int ReadConfig(int modules, const char *cfgfile, void *d1, void *d2)
const char *xml_agent_profile = "profile";

int xml_ret = OS_ReadXML(cfgfile, &xml);

if (xml_ret < 0) {
char *tmpcfg;
tmpcfg = strdup(cfgfile);
const char *cfg_base = basename(tmpcfg);
if((strncmp(cfg_base, "agent.conf", 10)) == 0 && xml_ret == -2) {
debug2("WARN: Cannot open %s: %s", cfgfile, xml.err);
} else {
merror(XML_ERROR, __local_name, cfgfile, xml.err, xml.err_line);
}
return (OS_INVALID);
char *tmpcfg;
tmpcfg = strdup(cfgfile);
const char *cfg_base = basename(tmpcfg);
if((strncmp(cfg_base, "agent.conf", 10)) == 0 && xml_ret == -2) {
debug2("WARN: Cannot open %s: %s", cfgfile, xml.err);
} else {
merror(XML_ERROR, __local_name, cfgfile, xml.err, xml.err_line);
}
return(OS_INVALID);
}

node = OS_GetElementsbyNode(&xml, NULL);
Expand Down
188 changes: 0 additions & 188 deletions src/config/reports-config.c

This file was deleted.

13 changes: 1 addition & 12 deletions src/config/reports-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@
#ifndef _REPORTSCONFIG_H
#define _REPORTSCONFIG_H

#include "report_op.h"

/* Structure for the report */
typedef struct _report_config {
char *title;
char *args;
char *relations;
char *type;
char **emailto;
report_filter r_filter;
} report_config;
//#include "report_op.h"

typedef struct _monitor_config {
unsigned short int day_wait;
Expand All @@ -35,7 +25,6 @@ typedef struct _monitor_config {
char *emailidsname;

char **agents;
report_config **reports;
} monitor_config;

#endif /* _REPORTSCONFIG_H */
131 changes: 0 additions & 131 deletions src/monitord/generate_reports.c

This file was deleted.

Loading