From: Jiří Filipovič Date: Fri, 25 May 2012 11:00:11 +0000 (+0000) Subject: allow glite seqcodes for events going through CREAM X-Git-Tag: canl_merge_branch_1_0_head_take_2_dst~6 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=7250ec8ed3c343f24687519e8c240118902e577b;p=jra1mw.git allow glite seqcodes for events going through CREAM --- diff --git a/org.glite.lb.common/src/context.c b/org.glite.lb.common/src/context.c index 78c907d..ed6530a 100644 --- a/org.glite.lb.common/src/context.c +++ b/org.glite.lb.common/src/context.c @@ -401,6 +401,8 @@ char *edg_wll_GetSequenceCode(const edg_wll_Context ctx) char *ret = NULL; switch (ctx->p_seqcode.type) { + case EDG_WLL_SEQ_CREAM: + /* fall through */ case EDG_WLL_SEQ_DUPLICATE: /* fall through */ case EDG_WLL_SEQ_NORMAL: @@ -429,9 +431,6 @@ char *edg_wll_GetSequenceCode(const edg_wll_Context ctx) case EDG_WLL_SEQ_CONDOR: ret = strdup(ctx->p_seqcode.condor); break; - case EDG_WLL_SEQ_CREAM: - ret = strdup("no_seqcodes_with_CREAM"); - break; default: edg_wll_SetError(ctx,EINVAL,"edg_wll_GetSequenceCode(): unknown sequence code type"); return NULL; @@ -452,6 +451,8 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, ctx->p_seqcode.type = seq_type; switch (seq_type) { + case EDG_WLL_SEQ_CREAM: + /* fall through */ case EDG_WLL_SEQ_DUPLICATE: /* fall through */ case EDG_WLL_SEQ_NORMAL: @@ -478,8 +479,11 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, /* pre-collections compatibility */ c[EDG_WLL_SOURCE_LB_SERVER] = 0; } else if (res != EDG_WLL_SEQ_FORMAT_NUMBER) - return edg_wll_SetError(ctx, EINVAL, - "edg_wll_SetSequenceCode(): syntax error in sequence code"); + if (seq_type == EDG_WLL_SEQ_CREAM) + return 0; + else + return edg_wll_SetError(ctx, EINVAL, + "edg_wll_SetSequenceCode(): syntax error in sequence code"); if (seq_type == EDG_WLL_SEQ_DUPLICATE) { if (ctx->p_source <= EDG_WLL_SOURCE_NONE || @@ -520,8 +524,6 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, else strncpy(ctx->p_seqcode.condor, seqcode_str, sizeof(ctx->p_seqcode.condor)); break; - case EDG_WLL_SEQ_CREAM: - break; /* XXX: not yet */ default: return edg_wll_SetError(ctx, EINVAL, "edg_wll_SetSequenceCode(): unrecognized value of seq_type parameter"); @@ -535,9 +537,10 @@ int edg_wll_IncSequenceCode(edg_wll_Context ctx) edg_wll_ResetError(ctx); switch (ctx->p_seqcode.type) { + case EDG_WLL_SEQ_CREAM: + /* fall through */ case EDG_WLL_SEQ_DUPLICATE: /* fall through */ - case EDG_WLL_SEQ_PBS: case EDG_WLL_SEQ_NORMAL: if (ctx->p_source <= EDG_WLL_SOURCE_NONE || ctx->p_source >= EDG_WLL_SOURCE__LAST) @@ -548,7 +551,7 @@ int edg_wll_IncSequenceCode(edg_wll_Context ctx) ctx->p_seqcode.c[ctx->p_source]++; break; - case EDG_WLL_SEQ_CREAM: + case EDG_WLL_SEQ_PBS: /* no action */ break; default: