Stan Gurtler 3 éve
szülő
commit
a10357f188
1 módosított fájl, 15 hozzáadás és 13 törlés
  1. 15 13
      prsona/src/networkOrchestrator.cpp

+ 15 - 13
prsona/src/networkOrchestrator.cpp

@@ -40,44 +40,46 @@ void start_remote_actor(
     argv[0] = fileBuffer;
 
     char flagBuffer[3];
-    strncpy(flagBuffer, "-n", 3);
+    strncpy(flagBuffer, "-f", 3);
 
     char targetBuffer[64];
     strncpy(targetBuffer, target.c_str(), 64);
 
-    std::string fullArgString("~/prsona/prsona");
+    std::string fullArgString();
     char fullArgBuffer[256];
 
-    fullArgString = fullArgString + "/" + (server ? serverFile : clientFile) + " ";
-
     char idBuffer[64];
     strncpy(idBuffer, id.c_str(), 64);
 
-    fullArgString = fullArgString + id + " ";
-
     char outputBuffer[128];
     strncpy(outputBuffer, output.c_str(), 128);
 
-    fullArgString = fullArgString + output + " ";
-
     std::stringstream lambdaStream;
     lambdaStream << lambda;
     char lambdaBuffer[3];
     strncpy(lambdaBuffer, lambdaStream.str().c_str(), 3);
 
-    fullArgString = fullArgString + lambdaStream.str() + " ";
-
     char maliciousBuffer[3];
     if (maliciousServers)
         strncpy(maliciousBuffer, "T", 2);
     else
         strncpy(maliciousBuffer, "F", 2);
 
-    fullArgString = fullArgString + (maliciousServers ? "T" : "F");
-    strncpy(fullArgBuffer, fullArgString.c_str(), 256);
-
     if (target != "self" && !target.empty())
     {
+        fullArgString = "~/prsona/prsona/scripts/startup.sh ";
+        fullArgString += (server ? "server" : "client");
+        fullArgString += " ";
+        fullArgString += id;
+        fullArgString += " ";
+        fullArgString += output;
+        fullArgString += " ";
+        fullArgString += lambdaStream.str();
+        fullArgString += " ";
+        fullArgString += (maliciousServers ? "T" : "F");
+
+        strncpy(fullArgBuffer, fullArgString.c_str(), 256);
+
         argv[1] = flagBuffer;
         argv[2] = targetBuffer;
         argv[3] = fullArgBuffer;