1 /* @(#) $Id: ./src/logcollector/config.c, 2011/10/07 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
13 /* v0.3 (2005/08/23): Using the new OS_XML syntax and changing some usage
20 #include "logcollector.h"
23 /* LogCollectorConfig v0.3, 2005/03/03
24 * Read the config file (the localfiles)
25 * v0.3: Changed for the new OS_XML
27 int LogCollectorConfig(char * cfgfile, int accept_remote)
31 logreader_config log_config;
35 log_config.config = NULL;
36 log_config.agent_cfg = 0;
37 log_config.accept_remote = accept_remote;
39 if(ReadConfig(modules, cfgfile, &log_config, NULL) < 0)
43 modules|= CAGENT_CONFIG;
44 log_config.agent_cfg = 1;
45 ReadConfig(modules, AGENTCONFIG, &log_config, NULL);
46 log_config.agent_cfg = 0;
49 logff = log_config.config;