Prechádzať zdrojové kódy

HPCC-11398 Change getNodeGroupFromLFN() to match code convention

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
Kevin Wang 11 rokov pred
rodič
commit
efd3439086
1 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 4 3
      esp/services/ws_fs/ws_fsService.cpp

+ 4 - 3
esp/services/ws_fs/ws_fsService.cpp

@@ -601,11 +601,11 @@ void setRoxieClusterPartDiskMapping(const char *clusterName, const char *default
     wuOptions->setReplicate(replicate);
 }
 
-void getNodeGroupFromLFN(const char* lfn, StringBuffer& nodeGroup, const char* username, const char* passwd)
+StringBuffer& getNodeGroupFromLFN(StringBuffer& nodeGroup, const char* lfn, const char* username, const char* passwd)
 {
     Owned<IRemoteConnection> conn = querySDS().connect("Environment", myProcessSession(), RTM_LOCK_READ, SDS_LOCK_TIMEOUT);
     if (!conn)
-        return;
+        return nodeGroup;
 
     Owned<IUserDescriptor> udesc;
     if(username != NULL && *username != '\0')
@@ -618,6 +618,7 @@ void getNodeGroupFromLFN(const char* lfn, StringBuffer& nodeGroup, const char* u
     LogicFileWrapper lfw;
     lfw.FindClusterName(lfn, clusterName, udesc);
     getClusterThorGroupName(nodeGroup, clusterName.str());
+    return nodeGroup;
 }
 
 StringBuffer& constructFileMask(const char* filename, StringBuffer& filemask)
@@ -2344,7 +2345,7 @@ bool CFileSprayEx::onCopy(IEspContext &context, IEspCopy &req, IEspCopyResponse
         const char* destNodeGroupReq = req.getDestGroup();
         if(!destNodeGroupReq || !*destNodeGroupReq)
         {
-            getNodeGroupFromLFN(srcname, destNodeGroup, context.queryUserId(), context.queryPassword());
+            getNodeGroupFromLFN(destNodeGroup, srcname, context.queryUserId(), context.queryPassword());
             DBGLOG("Destination node group not specified, using source node group %s", destNodeGroup.str());
         }
         else