From: Miloš Mulač Date: Fri, 16 Feb 2007 16:11:59 +0000 (+0000) Subject: better seq_type handling X-Git-Tag: glite-lb-server-bones_R_2_2_4_1~44 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=fe29ef22c2d6bb2c926d31d5276eb9ba7ec62798;p=jra1mw.git better seq_type handling --- diff --git a/org.glite.lb.common/src/context.c b/org.glite.lb.common/src/context.c index 39e0387..6012e5d 100644 --- a/org.glite.lb.common/src/context.c +++ b/org.glite.lb.common/src/context.c @@ -348,12 +348,12 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, edg_wll_ResetError(ctx); + ctx->p_seqcode.type = seq_type; + switch (seq_type) { case EDG_WLL_SEQ_DUPLICATE: - ctx->p_seqcode.type = EDG_WLL_SEQ_DUPLICATE; /* fall through */ case EDG_WLL_SEQ_NORMAL: - ctx->p_seqcode.type = EDG_WLL_SEQ_NORMAL; if (!seqcode_str) { memset(&ctx->p_seqcode,0,sizeof ctx->p_seqcode); return 0; @@ -376,7 +376,7 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, return edg_wll_SetError(ctx, EINVAL, "edg_wll_SetSequenceCode(): syntax error in sequence code"); - if (ctx->p_seqcode.type == EDG_WLL_SEQ_DUPLICATE) { + if (seq_type == EDG_WLL_SEQ_DUPLICATE) { if (ctx->p_source <= EDG_WLL_SOURCE_NONE || ctx->p_source >= EDG_WLL_SOURCE__LAST) { @@ -388,12 +388,12 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, break; case EDG_WLL_SEQ_PBS: strncpy(ctx->p_seqcode.pbs, seqcode_str, sizeof(ctx->p_seqcode.pbs)); - ctx->p_seqcode.type = EDG_WLL_SEQ_PBS; break; default: return edg_wll_SetError(ctx, EINVAL, "edg_wll_SetSequenceCode(): unrecognized value of seq_type parameter"); } + return edg_wll_Error(ctx, NULL, NULL); }