[Greater-commits] r207 - trunk/GREAT-ER-DB/trunk/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 16 14:26:30 CEST 2011
Author: aheinecke
Date: 2011-06-16 14:26:29 +0200 (Thu, 16 Jun 2011)
New Revision: 207
Modified:
trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.pgc
trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc
Log:
Correctly set the connection values when logging in as an admin
this fixes multiple crashes that where caused by not all variables
of conn initialized.
Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.pgc 2011-06-15 10:08:43 UTC (rev 206)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.pgc 2011-06-16 12:26:29 UTC (rev 207)
@@ -51,7 +51,7 @@
* access master object (subst.,
* env.param., mod.param.,...) */
-DB_con *con; /* global pointer var. for db-connection */
+static DB_con *con; /* global pointer var. for db-connection */
/**************************************************************************
* LIBRARY INTERAL (LOCAL) FUNCTIONS
Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc 2011-06-15 10:08:43 UTC (rev 206)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/gdagreater_pg.pgc 2011-06-16 12:26:29 UTC (rev 207)
@@ -4082,12 +4082,10 @@
db_con = malloc(sizeof(DB_con));
if(!db_con)
- return (DA_FAIL);
+ return (DA_FAIL);
- db_con->con_name = "conn";
- db_con->user_id = vp_userid;
- db_con->user_passwd = vp_passwd;
- db_con->db_name = vp_connect_descr;
+ lgda_set_connection_values(db_con, vp_connect_descr,
+ vp_userid, vp_passwd, vp_errinfo);
/* Initialise admin flag */
More information about the Greater-commits
mailing list