Przeglądaj źródła

HPCC-15487 Fileservices functions not threadsafe if ESP URL not supplied

Also fix some cores when running as standalone executable.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 lat temu
rodzic
commit
d3ea57d25a
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      plugins/fileservices/fileservices.cpp

+ 3 - 2
plugins/fileservices/fileservices.cpp

@@ -263,7 +263,7 @@ StringBuffer & constructLogicalName(IConstWorkUnit * wu, const char * partialLog
 
     if (*partialLogicalName == '~')
         ++partialLogicalName;
-    else
+    else if (wu)
     {
         StringBuffer prefix;
         wu->getScope(StringBufferAdaptor(prefix));
@@ -887,7 +887,8 @@ FILESERVICES_API char * FILESERVICES_CALL fsfDespray(ICodeContext *ctx, const ch
     CClientFileSpray server;
     Owned<IConstWorkUnit> wu = getWorkunit(ctx);
     server.addServiceUrl(getEspServerURL(espServerIpPort));
-    setServerAccess(server, wu);
+    if (wu)
+        setServerAccess(server, wu);
 
     Owned<IClientDespray> req = server.createDesprayRequest();
     StringBuffer logicalName;