From bcb12cc5922cb9bfa0d3abfb970a83074510dbb8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 31 Oct 2008 14:43:30 +0000 Subject: [PATCH] reduce length of intstat version add length test --- org.glite.lb.server/src/jobstat.c | 4 ++++ org.glite.lb.state-machine/interface/intjobstat.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.server/src/jobstat.c b/org.glite.lb.server/src/jobstat.c index 13465f1..3af4529 100644 --- a/org.glite.lb.server/src/jobstat.c +++ b/org.glite.lb.server/src/jobstat.c @@ -733,6 +733,10 @@ edg_wll_ErrorCode edg_wll_StoreIntState(edg_wll_Context ctx, int dbret; char *icnames, *icvalues; + + /* check size of intstat version, its only varchar(32) */ + assert(strlen(INTSTAT_VERSION) <= 32); + update = (seq > 0); jobid_md5 = edg_wlc_JobIdGetUnique(stat->pub.jobId); stat_enc = enc_intJobStat(strdup(""), stat); diff --git a/org.glite.lb.state-machine/interface/intjobstat.h b/org.glite.lb.state-machine/interface/intjobstat.h index 50d2f3e..8be7476 100644 --- a/org.glite.lb.state-machine/interface/intjobstat.h +++ b/org.glite.lb.state-machine/interface/intjobstat.h @@ -14,8 +14,8 @@ /* where Z.XX is version from indent + 1 (version after commit), Y = Z+1 */ /* and DESCRIPTION is short hit why version changed */ -#define INTSTAT_VERSION "revision 2.6 - user tag sequences" - +#define INTSTAT_VERSION "revision 2.7 - usertag sequences" +// ".... MAX LENGTH 32 BYTES !! ...." // Internal error codes -- 1.8.2.3