From: Zdeněk Salvet Date: Wed, 28 May 2008 10:12:15 +0000 (+0000) Subject: Fix error reporting in edg_wll_log_connect(). X-Git-Tag: glite-lb-client_R_3_2_1_1~12 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=676a6ba2ab584225a851e08bf585fa9ed33d7035;p=jra1mw.git Fix error reporting in edg_wll_log_connect(). --- diff --git a/org.glite.lb.client/src/prod_proto.c b/org.glite.lb.client/src/prod_proto.c index f9f1822..c4d46d6 100644 --- a/org.glite.lb.client/src/prod_proto.c +++ b/org.glite.lb.client/src/prod_proto.c @@ -215,11 +215,13 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) /* check if connection already in pool */ if ( (index = ConnectionIndex(ctx, ctx->p_destination, ctx->p_dest_port)) == -1 ) { if (ctx->connections->connOpened == ctx->connections->poolSize) - if (ReleaseConnection(ctx, NULL, 0)) + if (ReleaseConnection(ctx, NULL, 0)) { + answer = edg_wll_SetError(ctx,EAGAIN,"cannot release connection (pool size exceeded)"); goto edg_wll_log_connect_end; + } index = AddConnection(ctx, ctx->p_destination, ctx->p_dest_port); if (index < 0) { - edg_wll_SetError(ctx,EAGAIN,"connection pool size exceeded"); + answer = edg_wll_SetError(ctx,EAGAIN,"cannot add connection to pool"); goto edg_wll_log_connect_end; } #ifdef EDG_WLL_LOG_STUB @@ -242,7 +244,7 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) &ctx->connections->connPool[index].gsiCred, &my_subject_name, &gss_stat); /* give up if unable to acquire prescribed credentials, otherwise go on anonymously */ if (ret && ctx->p_proxy_filename) { - edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat); + answer = edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat); goto edg_wll_log_connect_err; } #ifdef EDG_WLL_LOG_STUB