new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_csyslogd / config.c
old mode 100755 (executable)
new mode 100644 (file)
index fbeb54e..122abf5
@@ -1,50 +1,36 @@
-/* @(#) $Id: config.c,v 1.2 2009/06/24 17:06:29 dcid Exp $ */
-
 /* Copyright (C) 2009 Trend Micro Inc.
  * All rights reserved.
  *
  * This program is a free software; you can redistribute it
  * and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
  * Foundation.
- *
- * License details at the LICENSE file included with OSSEC or
- * online at: http://www.ossec.net/en/licensing.html
  */
 
-
 #include "csyslogd.h"
 #include "config/global-config.h"
 #include "config/config.h"
 
 
-/** void *OS_SyslogConf(int test_config, char *cfgfile, 
-                        SyslogConfig **syslog_config)
- * Reads configuration.
- */
-void *OS_ReadSyslogConf(int test_config, char *cfgfile, 
-                        SyslogConfig **syslog_config)
+/* Read configuration */
+SyslogConfig **OS_ReadSyslogConf(__attribute__((unused)) int test_config, const char *cfgfile)
 {
     int modules = 0;
-    GeneralConfig gen_config;
-
+    struct SyslogConfig_holder config;
+    SyslogConfig **syslog_config = NULL;
 
     /* Modules for the configuration */
-    modules|= CSYSLOGD;
-    gen_config.data = syslog_config;
+    modules |= CSYSLOGD;
+    config.data = syslog_config;
 
-    
-    /* Reading configuration */
-    if(ReadConfig(modules, cfgfile, &gen_config, NULL) < 0)
-    {
+    /* Read configuration */
+    if (ReadConfig(modules, cfgfile, &config, NULL) < 0) {
         ErrorExit(CONFIG_ERROR, ARGV0, cfgfile);
-        return(NULL);
-    }    
+        return (NULL);
+    }
 
-    
-    syslog_config = gen_config.data;
+    syslog_config = config.data;
 
-    return(syslog_config);
+    return (syslog_config);
 }
 
-/* EOF */