From fca6f3adcaa2e8a1758faa7a79411fc472feda7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Wed, 27 May 2009 11:02:40 +0000 Subject: [PATCH] extended for any job state --- org.glite.lb.client/examples/stats.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.client/examples/stats.c b/org.glite.lb.client/examples/stats.c index af6dcb1..3e68e4f 100644 --- a/org.glite.lb.client/examples/stats.c +++ b/org.glite.lb.client/examples/stats.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -17,8 +18,8 @@ int main(int argc,char **argv) edg_wll_InitContext(&ctx); - if (argc != 2) { - fprintf(stderr,"usage: %s \n",argv[0]); + if (argc < 3) { + fprintf(stderr,"usage: %s CE major [minor]\n",argv[0]); return 1; } @@ -58,7 +59,7 @@ int main(int argc,char **argv) to = now; from = now - 60; - if (edg_wll_StateRate(ctx,group,EDG_WLL_JOB_DONE,EDG_WLL_STAT_FAILED, + if (edg_wll_StateRate(ctx,group,atoi(argv[2]),argc >=4 ? atoi(argv[3]) : 0, &from,&to,&val,&from_res,&to_res)) { char *et,*ed; -- 1.8.2.3