From: František Dvořák Date: Mon, 11 Oct 2010 12:49:10 +0000 (+0000) Subject: Support for jobid type options in logevent. X-Git-Tag: glite-lb-client_R_4_1_5_1~23 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=9075fd4b144463f2a03efc0c19174755c4c9adf4;p=jra1mw.git Support for jobid type options in logevent. --- diff --git a/org.glite.lb.client/src/args.c.T b/org.glite.lb.client/src/args.c.T index 72daeb2..88eddcf 100644 --- a/org.glite.lb.client/src/args.c.T +++ b/org.glite.lb.client/src/args.c.T @@ -321,6 +321,18 @@ static void read_timeval(const edg_wll_Args* o, char* arg, char* par) *(int*)o->value = v; } +static void read_jobid(const edg_wll_Args* o, char* arg, char* par) +{ + glite_jobid_t jobid = NULL; + + if (glite_jobid_parse(par, &jobid) != 0) { + fprintf(stderr, "ERROR %s can't parse %s: %s\n", arg, par, strerror(errno)); + exit(1); + } + if (o->value) *(glite_jobid_t *)o->value = jobid; + else glite_jobid_free(jobid); +} + static void show_help(const edg_wll_Args* o, int prefix) { unsigned max = 0; @@ -542,6 +554,9 @@ static int findOpt(opt_ctx_t* ctx, int olong) case EDG_WLL_ARGS_TIMEVAL: read_timeval(o, arg, par); break; + case EDG_WLL_ARGS_JOBID: + read_jobid(o, arg, par); + break; default: printf("FIXME: unhandle option type %d\n", o->type); break;