From: Jiří Filipovič Date: Wed, 19 Jan 2011 10:52:21 +0000 (+0000) Subject: Return ENOENT instead of empty list when ALL-statistics queries existing, but empty... X-Git-Tag: merge_21_head_round3_dst~32 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d5623d3aa1412f2e51c88a7f38f361e995751265;p=jra1mw.git Return ENOENT instead of empty list when ALL-statistics queries existing, but empty group. --- diff --git a/org.glite.lb.server/src/stats.c b/org.glite.lb.server/src/stats.c index 6c4ac4a..003d8a4 100644 --- a/org.glite.lb.server/src/stats.c +++ b/org.glite.lb.server/src/stats.c @@ -788,6 +788,9 @@ int edg_wll_StateRateServer( free(*groups); *groups = NULL; goto cleanup; } + else if (i == shift){ // found groups, but all empty + edg_wll_SetError(ctx,ENOENT,"no data available"); + } else edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked } @@ -1034,6 +1037,8 @@ int edg_wll_StateDurationFromToServer( free(*groups); *groups = NULL; goto cleanup; } + else if (i == shift) + edg_wll_SetError(ctx,ENOENT,"no data available"); else edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked }