git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd8d98f
)
propagate connection error
author
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 22 Nov 2007 13:01:26 +0000
(13:01 +0000)
committer
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 22 Nov 2007 13:01:26 +0000
(13:01 +0000)
org.glite.lbjp-common.db/src/db.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lbjp-common.db/src/db.c
b/org.glite.lbjp-common.db/src/db.c
index
6b29fc9
..
1c8e663
100644
(file)
--- a/
org.glite.lbjp-common.db/src/db.c
+++ b/
org.glite.lbjp-common.db/src/db.c
@@
-938,10
+938,14
@@
static int db_connect(glite_lbu_DBContext ctx, const char *cs, MYSQL **mysql) {
* working in update_notif().
* Hope it does not break anything else */
if (!db_handle.mysql_real_connect(*mysql,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) {
+ char *desc;
free(buf);
ret = MY_ERR(ctx);
+ desc = ctx->err.desc;
+ ctx->err.desc = NULL;
glite_lbu_DBClose(ctx);
- return ret;
+ ctx->err.desc = desc;
+ return ctx->err.code = ret;
}
free(buf);