From fe29ef22c2d6bb2c926d31d5276eb9ba7ec62798 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 16 Feb 2007 16:11:59 +0000 Subject: [PATCH] better seq_type handling --- org.glite.lb.common/src/context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } -- 1.8.2.3