Explorar o código

HPCC-22405 Fix check in WorkunitTimeStamps to support 6.4 workunits

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday %!s(int64=6) %!d(string=hai) anos
pai
achega
64c5e4d2a4
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      plugins/workunitservices/workunitservices.cpp

+ 4 - 2
plugins/workunitservices/workunitservices.cpp

@@ -534,8 +534,10 @@ public:
     {
         const char * curScope = cur.queryScope();
         const char * kindName = queryStatisticName(kind);
-        assertex(kindName && memicmp(kindName, "when", 4) == 0);
-        kindName += 4;
+        assertex(kindName);
+        ///The following will be true on workunits >= 7.0, but may not be for 6.4 and earlier
+        if (memicmp(kindName, "when", 4) == 0)
+            kindName += 4;
 
         StringBuffer formattedTime;
         convertTimestampToStr(value, formattedTime, true);