Return ENOENT instead of empty list when ALL-statistics queries existing, but empty...
authorJiří Filipovič <fila@ics.muni.cz>
Wed, 19 Jan 2011 10:45:25 +0000 (10:45 +0000)
committerJiří Filipovič <fila@ics.muni.cz>
Wed, 19 Jan 2011 10:45:25 +0000 (10:45 +0000)
org.glite.lb.server/src/stats.c

index 3d3b3d6..15f8b11 100644 (file)
@@ -787,6 +787,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
        }
@@ -1033,6 +1036,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
        }