From: Kevin P. Fleming Date: Mon, 6 Jun 2005 02:43:01 +0000 (+0000) Subject: let ODBC username/password default to the ones in odbc.ini (bug #4470) X-Git-Tag: 1.2.0-beta1~510 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=236c05fc592eb55db07c18a2cfe7c501d1f225bc;p=thirdparty%2Fasterisk.git let ODBC username/password default to the ones in odbc.ini (bug #4470) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5854 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c index c31fb63f3a..b654f6bd6b 100755 --- a/cdr/cdr_odbc.c +++ b/cdr/cdr_odbc.c @@ -284,9 +284,6 @@ static int odbc_load_module(void) res = -1; goto out; } - } else { - ast_log(LOG_WARNING,"cdr_odbc: username not specified. Assuming root\n"); - username = "root"; } tmp = ast_variable_retrieve(cfg,"global","password"); @@ -301,9 +298,6 @@ static int odbc_load_module(void) res = -1; goto out; } - } else { - ast_log(LOG_WARNING,"cdr_odbc: database password not specified. Assuming blank\n"); - password = ""; } tmp = ast_variable_retrieve(cfg,"global","loguniqueid"); @@ -352,8 +346,13 @@ static int odbc_load_module(void) ast_config_destroy(cfg); if (option_verbose > 2) { ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: dsn is %s\n",dsn); - ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: username is %s\n",username); - ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: password is [secret]\n"); + if (username) + { + ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: username is %s\n",username); + ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: password is [secret]\n"); + } + else + ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: retreiving username and password from odbc config\n"); ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: table is %s\n",table); }