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

index 6c4ac4a..003d8a4 100644 (file)
@@ -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
        }