[Greater-commits] r271 - trunk/GREAT-ER-DB/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 27 11:15:33 CEST 2011
Author: bricks
Date: 2011-06-27 11:15:33 +0200 (Mon, 27 Jun 2011)
New Revision: 271
Modified:
trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
Log:
Fix indentation
Modified: trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-27 09:14:43 UTC (rev 270)
+++ trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-27 09:15:33 UTC (rev 271)
@@ -4044,7 +4044,7 @@
DB_con* gda_db_connect(char *vp_userid,
char *vp_passwd,
char *vp_connect_descr,
- DA_T_errinfo *vp_errinfo)
+ DA_T_errinfo *vp_errinfo)
{
DA_T_MODULE_NAME v_module = "gda_db_connect";
DA_T_errinfo *v_errinfo2 = NULL;
@@ -4052,20 +4052,20 @@
EXEC SQL BEGIN DECLARE SECTION;
long h_group_id;
- char h_dbname [ 31];
+ char h_dbname [ 31];
char h_user_id [ 31];
- char h_con_name [ 31];
+ char h_con_name [ 31];
char h_usrid_passwd[240];
short int h_ind_user_id;
EXEC SQL END DECLARE SECTION;
db_con = malloc(sizeof(DB_con));
- if(!db_con)
- return NULL;
+ if(!db_con)
+ return NULL;
lgda_set_connection_values(db_con, vp_connect_descr,
- vp_userid, vp_passwd, vp_errinfo);
+ vp_userid, vp_passwd, vp_errinfo);
/* ------------------ *
* Start of function
@@ -4092,7 +4092,7 @@
if (!ECPGstatus(__LINE__, db_con->con_name))
{
- return(NULL);
+ return(NULL);
}
/* check if connected user is a valid GREAT-ER user and in case
@@ -4117,25 +4117,25 @@
INTO :h_group_id
FROM USER_TAB
WHERE USER_ID = :h_user_id;
-
+
strcpy(vg_db_user_info.user_id, h_user_id);
- vg_db_user_info.group_id = h_group_id;
+ vg_db_user_info.group_id = h_group_id;
vg_db_user_info.admin = 0;
if(NULL){
not_a_valid_greater_user:
- /*
+ /*
* ERROR: no valid greater user
*/
vp_errinfo->err_type = DA_ERRTYP_INT;
vp_errinfo->err_no = DA_ERR_INVALID_DB_USER;
- sprintf(vp_errinfo->err_param, "%s - (%s)", v_module, db_con->user_id);
+ sprintf(vp_errinfo->err_param, "%s - not a valid user (%s)", v_module, db_con->user_id);
/* disconnect from database */
gda_db_disconnect(db_con, v_errinfo2);
/* set return value */
- return(NULL);
+ return(NULL);
}
/* success fully connected to database */
@@ -4143,17 +4143,17 @@
if(NULL){
not_a_valid_db_user:
- /* set error information into return parameter */
- lgda_set_db_errinfo( v_module, vp_errinfo);
- db_con = NULL;
- return(db_con);
+ /* set error information into return parameter */
+ lgda_set_db_errinfo( v_module, vp_errinfo);
+ db_con = NULL;
+ return(db_con);
}
if(NULL){
sql_error:
- lgda_set_db_errinfo( v_module, vp_errinfo);
+ lgda_set_db_errinfo( v_module, vp_errinfo);
gda_db_disconnect(db_con, v_errinfo2);
- return(NULL);
- }
+ return(NULL);
+ }
}
More information about the Greater-commits
mailing list