-/* @(#) $Id$ */
+/* @(#) $Id: ./src/os_dbd/config.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
modules|= CDBD;
modules|= CRULES;
-
+
/* Allocating config just to get the rules. */
os_calloc(1, sizeof(_Config), tmp_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.
*/
{
return(0);
}
-
+
/* Checking for a valid config. */
if(!db_config->host ||
osdb_close = mysql_osdb_close;
}
#endif
-
+
#ifdef UPOSTGRES
if(db_config->db_type == POSTGDB)
{
{
#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)
{