From: Aleš Křenek Date: Thu, 22 Nov 2007 13:01:26 +0000 (+0000) Subject: propagate connection error X-Git-Tag: glite-yaim-lb_R_4_0_1_1~28 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=062a1f261ea6069c10d098e463f54c198e60ec80;p=jra1mw.git propagate connection error --- diff --git a/org.glite.lbjp-common.db/src/db.c b/org.glite.lbjp-common.db/src/db.c index 6b29fc9..1c8e663 100644 --- 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);