Update of /usr/cvsroot/asterisk/cdr
In directory mongoose.digium.com:/tmp/cvs-serv4954/cdr

Modified Files:
        cdr_odbc.c 
Log Message:
let ODBC username/password default to the ones in odbc.ini (bug #4470)


Index: cdr_odbc.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/cdr_odbc.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- cdr_odbc.c  21 Apr 2005 06:02:43 -0000      1.25
+++ cdr_odbc.c  6 Jun 2005 02:43:01 -0000       1.26
@@ -284,9 +284,6 @@
                        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 @@
                        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 @@
        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);
        }
        

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to