From: Jiří Filipovič Date: Mon, 30 Apr 2012 23:55:44 +0000 (+0000) Subject: store sequential numbers for CREAM X-Git-Tag: merge_torque_to_head_after~26 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=abb513fbd2de4747bcf6cdd1924c466baecf15ed;p=jra1mw.git store sequential numbers for CREAM --- diff --git a/org.glite.lb.common/interface/context-int.h b/org.glite.lb.common/interface/context-int.h index caa9602..18a7423 100644 --- a/org.glite.lb.common/interface/context-int.h +++ b/org.glite.lb.common/interface/context-int.h @@ -61,6 +61,7 @@ typedef struct _edg_wll_SeqCode { /* 40-51 EV.CODE=%03d: */ /* 53-56 SRC=%c */ char condor[EDG_WLL_SEQ_CONDOR_SIZE]; + char cream[EDG_WLL_SEQ_SIZE]; } edg_wll_SeqCode; /* non-gsi one-element analogy of connPool for L&B Proxy server */ diff --git a/org.glite.lb.common/src/context.c b/org.glite.lb.common/src/context.c index 97f5e55..16d9893 100644 --- a/org.glite.lb.common/src/context.c +++ b/org.glite.lb.common/src/context.c @@ -418,7 +418,10 @@ char *edg_wll_GetSequenceCode(const edg_wll_Context ctx) ret = strdup(ctx->p_seqcode.condor); break; case EDG_WLL_SEQ_CREAM: - ret = strdup("no_seqcodes_with_CREAM"); /* XXX: not yet */ + if (ctx->p_seqcode.cream && ctx->p_seqcode.cream[0]) + ret = strdup(ctx->p_seqcode.cream); + else + ret = strdup("no_seqcodes_with_CREAM"); break; default: edg_wll_SetError(ctx,EINVAL,"edg_wll_GetSequenceCode(): unknown sequence code type"); @@ -492,6 +495,10 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx, strncpy(ctx->p_seqcode.condor, seqcode_str, sizeof(ctx->p_seqcode.condor)); break; case EDG_WLL_SEQ_CREAM: + if (!seqcode_str) + memset(&ctx->p_seqcode.cream, 0, sizeof ctx->p_seqcode.cream); + else + strncpy(ctx->p_seqcode.cream, seqcode_str, sizeof(ctx->p_seqcode.cream)); break; /* XXX: not yet */ default: return edg_wll_SetError(ctx, EINVAL,