瀏覽代碼

HPCC-23136 Fix uninitialized request value causing serialization error

Fix uninitialized value in client side use of WULogFileRequest causing
exception in serialization.

Also fix infinite loop in processing of WULogFileResponse exceptions
in "eclplus dump" command.

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexisrisk.com>
Anthony Fishbeck 5 年之前
父節點
當前提交
ce6ad8ad5f
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 2
      ecl/eclplus/DumpHelper.cpp
  2. 1 0
      esp/services/ws_workunits/ws_workunitsQuerySets.cpp

+ 2 - 2
ecl/eclplus/DumpHelper.cpp

@@ -21,8 +21,7 @@ static bool processExceptions(const IMultiException* excep)
 {
     if (excep && excep->ordinality())
     {
-        unsigned i = 0;
-        while (i < excep->ordinality())
+        ForEachItemIn(i, *excep)
         {
             StringBuffer msg;
             excep->item(i).errorMessage(msg);
@@ -80,6 +79,7 @@ bool DumpHelper::doit(FILE * fp)
             Owned<IClientWULogFileRequest> req = wuclient->createWUFileRequest();
             req->setWuid(wuid);
             req->setType("XML");
+            req->setErrorMessageFormat(CErrorMessageFormat_XML);
             Owned<IClientWULogFileResponse> resp = wuclient->WUFile(req);
             if(!resp)
             {

+ 1 - 0
esp/services/ws_workunits/ws_workunitsQuerySets.cpp

@@ -124,6 +124,7 @@ void fetchRemoteWorkunit(IClientWsWorkunits *_ws, IEspContext *ctx, const char *
         req->setQuery(query);
     if (wuid && *wuid)
         req->setWuid(wuid);
+    req->setErrorMessageFormat(CErrorMessageFormat_XML);
     req->setType("xml");
     Owned<IClientWULogFileResponse> resp = ws->WUFile(req);
     if (!resp || resp->getExceptions().ordinality() || !resp->getThefile().length())