[asterisk-commits] trunk r28936 - /trunk/cdr/cdr_pgsql.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri May 19 18:35:12 MST 2006


Author: russell
Date: Fri May 19 20:35:12 2006
New Revision: 28936

URL: http://svn.digium.com/view/asterisk?rev=28936&view=rev
Log:
remove an unused variable, and default the user to asterisk if not specified
in the config file (issue #7153, Mithraen)

Modified:
    trunk/cdr/cdr_pgsql.c

Modified: trunk/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_pgsql.c?rev=28936&r1=28935&r2=28936&view=diff
==============================================================================
--- trunk/cdr/cdr_pgsql.c (original)
+++ trunk/cdr/cdr_pgsql.c Fri May 19 20:35:12 2006
@@ -63,7 +63,7 @@
 static char *desc = "PostgreSQL CDR Backend";
 static char *name = "pgsql";
 static char *config = "cdr_pgsql.conf";
-static char *pghostname = NULL, *pgdbname = NULL, *pgdbuser = NULL, *pgpassword = NULL, *pgdbsock = NULL, *pgdbport = NULL, *table = NULL;
+static char *pghostname = NULL, *pgdbname = NULL, *pgdbuser = NULL, *pgpassword = NULL, *pgdbport = NULL, *table = NULL;
 static int connected = 0;
 
 AST_MUTEX_DEFINE_STATIC(pgsql_lock);
@@ -195,8 +195,6 @@
 		free(pgdbname);
 	if (pgdbuser)
 		free(pgdbuser);
-	if (pgdbsock)
-		free(pgdbsock);
 	if (pgpassword)
 		free(pgpassword);
 	if (pgdbport)
@@ -233,8 +231,8 @@
 		return -1;
 
 	if (!(tmp = ast_variable_retrieve(cfg, "global", "user"))) {
-		ast_log(LOG_WARNING,"PostgreSQL database user not specified.  Assuming root\n");
-		tmp = "root";
+		ast_log(LOG_WARNING,"PostgreSQL database user not specified.  Assuming asterisk\n");
+		tmp = "asterisk";
 	}
 
 	if (!(pgdbuser = ast_strdup(tmp)))



More information about the asterisk-commits mailing list