reduce length of intstat version
authorMiloš Mulač <mulac@civ.zcu.cz>
Fri, 31 Oct 2008 14:43:30 +0000 (14:43 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Fri, 31 Oct 2008 14:43:30 +0000 (14:43 +0000)
add length test

org.glite.lb.server/src/jobstat.c
org.glite.lb.state-machine/interface/intjobstat.h

index 13465f1..3af4529 100644 (file)
@@ -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);
index 50d2f3e..8be7476 100644 (file)
@@ -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