From 81a612f9c7fcb17a37130fadcd0464231609f703 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 7 Mar 2015 12:33:26 +0000
Subject: [PATCH]

---
 Common/GmshSocket.h               | 2 +-
 Common/gmshLocalNetworkClient.cpp | 5 +++--
 Common/onelab.h                   | 2 +-
 contrib/onelab/OnelabClients.cpp  | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h
index 7eaff6742e..2ee9cd6d81 100644
--- a/Common/GmshSocket.h
+++ b/Common/GmshSocket.h
@@ -326,7 +326,7 @@ class GmshServer : public GmshSocket{
  public:
   GmshServer() : GmshSocket(), _portno(-1) {}
   virtual ~GmshServer(){}
-  virtual int NonBlockingSystemCall(const char *exe, const char *args) = 0;
+  virtual int NonBlockingSystemCall(const std::string &exe, const std::string &args) = 0;
   virtual int NonBlockingWait(double waitint, double timeout, int socket=-1) = 0;
   // start the client by launching "exe args" (args is supposed to contain
   // '%s' where the socket name should appear)
diff --git a/Common/gmshLocalNetworkClient.cpp b/Common/gmshLocalNetworkClient.cpp
index 125e5c56d8..b8752046b7 100644
--- a/Common/gmshLocalNetworkClient.cpp
+++ b/Common/gmshLocalNetworkClient.cpp
@@ -37,7 +37,7 @@ class onelabGmshServer : public GmshServer{
   onelabGmshServer(onelab::localNetworkClient *client)
     : GmshServer(), _client(client) {}
   ~onelabGmshServer(){}
-  int NonBlockingSystemCall(const char *exe, const char *args)
+  int NonBlockingSystemCall(const std::string &exe, const std::string &args)
   {
     return SystemCallExe(exe, args);
   }
@@ -399,7 +399,8 @@ bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
 	    it != onelab::server::instance()->lastClient(); it++){
 	  reply.append(it->second->getName() + " ");
 	}
-	Msg::Error("Skipping already existing client <%s> - Registered clients are < %s>",clientName.c_str(),reply.c_str());
+	Msg::Error("Skipping already existing client <%s> - Registered clients are < %s>",
+                   clientName.c_str(), reply.c_str());
 	getGmshServer()->SendMessage
 	  (GmshSocket::GMSH_STOP, reply.size(), &reply[0]); // reply is dummy
       }
diff --git a/Common/onelab.h b/Common/onelab.h
index fafc38a39c..e249b5f3af 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -1434,7 +1434,7 @@ namespace onelab{
     const std::string &getExecutable(){ return _executable; }
     void setExecutable(const std::string &s){ _executable = s; }
     const std::string &getRemoteLogin(){ return _remoteLogin; }
-    const bool treatExecutableAsFullCommandLine()
+    bool treatExecutableAsFullCommandLine() const
     {
       return _treatExecutableAsFullCommandLine;
     }
diff --git a/contrib/onelab/OnelabClients.cpp b/contrib/onelab/OnelabClients.cpp
index 5650b30de7..d448bc3c01 100644
--- a/contrib/onelab/OnelabClients.cpp
+++ b/contrib/onelab/OnelabClients.cpp
@@ -30,9 +30,9 @@ class onelabMetaModelServer : public GmshServer{
     : GmshServer(), _client(client) {}
   ~onelabMetaModelServer(){}
 
-  int NonBlockingSystemCall(const char *exe, const char *args){
+  int NonBlockingSystemCall(const std::string &exe, const std::string &args){
     std::cout << "Calling now : " << exe << " " << args << std::endl;
-    return SystemCall(exe, args);
+    return SystemCallExe(exe, args);
   }
   int NonBlockingWait(double waitint, double timeout, int socket)
   {
-- 
GitLab