X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_dbd%2Fconfig.c;h=9fed903dc7bd33d86e4bce5cf907555cd1befacc;hp=ee422b6772a6a722347d3ed4c502a011f29b4939;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/os_dbd/config.c b/src/os_dbd/config.c index ee422b6..9fed903 100755 --- a/src/os_dbd/config.c +++ b/src/os_dbd/config.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/os_dbd/config.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -31,7 +32,7 @@ int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config) modules|= CDBD; modules|= CRULES; - + /* Allocating config just to get the rules. */ os_calloc(1, sizeof(_Config), tmp_config); @@ -53,7 +54,7 @@ int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config) if(ReadConfig(modules, cfgfile, tmp_config, db_config) < 0) return(OS_INVALID); - + /* Here, we assign the rules to db_config and free the rest * of the Config. */ @@ -72,7 +73,7 @@ int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config) { return(0); } - + /* Checking for a valid config. */ if(!db_config->host || @@ -97,7 +98,7 @@ int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config) osdb_close = mysql_osdb_close; } #endif - + #ifdef UPOSTGRES if(db_config->db_type == POSTGDB) { @@ -116,17 +117,17 @@ int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config) { #ifndef UMYSQL merror(DB_COMPILED, ARGV0, "mysql"); - return(OS_INVALID); + return(OS_INVALID); #endif } else if(db_config->db_type == POSTGDB) { #ifndef UPOSTGRES merror(DB_COMPILED, ARGV0, "postgresql"); - return(OS_INVALID); + return(OS_INVALID); #endif } - + if(osdb_connect == NULL) {