Browse Source

Merge pull request #9012 from wangkx/h16089

HPCC-16089 Fix trigraph warning in esp logging code

Reviewed-By: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
ed7936b257

+ 6 - 1
esp/logging/loggingagent/espserverloggingagent/loggingagent.hpp

@@ -54,7 +54,12 @@ class CTransIDBuilder : public CInterface, implements IInterface
         if (value)
             id.append(value->get()).append('-');
         else
-            id.append('??-');
+        {
+            const char* ptr = key;
+            if (strlen(key) > 11) //skip the "transaction" prefix of the key
+                ptr += 11;
+            id.append('?').append(ptr).append('-');
+        }
     }
 
 public:

+ 2 - 1
esp/logging/logginglib/loggingagentbase.hpp

@@ -28,7 +28,8 @@
 
 #define UPDATELOGTHREADWAITINGTIME 3000
 
-
+//The 'TransactionXYZ' is expected for the following key strings
+//used in CTransIDBuilder::getTransID() -> add().
 static const char* sTransactionDateTime = "TransactionDateTime";
 static const char* sTransactionMethod = "TransactionMethod";
 static const char* sTransactionESPIP = "TransactionESPIP";