From 9075fd4b144463f2a03efc0c19174755c4c9adf4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Mon, 11 Oct 2010 12:49:10 +0000 Subject: [PATCH] Support for jobid type options in logevent. --- org.glite.lb.client/src/args.c.T | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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; -- 1.8.2.3