소스 검색

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 년 전
부모
커밋
ed7936b257
2개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 1
      esp/logging/loggingagent/espserverloggingagent/loggingagent.hpp
  2. 2 1
      esp/logging/logginglib/loggingagentbase.hpp

+ 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";