Salome HOME
The DistributedPythonNode with func is OK with HPContainer.
[modules/yacs.git] / src / runtime / PythonNode.cxx
index 881c332598e9cddd75e124ca0b64a500f71ad5fb..bd33fbd14b6b1b952222d363c2a4368afe037f65 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -132,11 +132,11 @@ void PythonNode::loadRemote()
   DEBTRACE( "---------------PyNode::loadRemote function---------------" );
   if(_container)
     {
-      if(!_container->isAlreadyStarted(0))
+      if(!_container->isAlreadyStarted(this))
         {
           try
             {
-              _container->start(0);
+              _container->start(this);
             }
           catch(Exception& e)
             {
@@ -153,7 +153,7 @@ void PythonNode::loadRemote()
       throw Exception(what);
     }
 
-  Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(0);
+  Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(this);
 
   try
     {
@@ -494,7 +494,7 @@ std::string PythonNode::getContainerLog()
   std::string msg;
   try
     {
-      Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(0);
+      Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(this);
       CORBA::String_var logname = objContainer->logfilename();
       DEBTRACE(logname);
       msg=logname;
@@ -637,11 +637,11 @@ void PyFuncNode::loadRemote()
   DEBTRACE( "---------------PyfuncNode::loadRemote function---------------" );
   if(_container)
     {
-      if(!_container->isAlreadyStarted(0))
+      if(!_container->isAlreadyStarted(this))
         {
           try
             {
-              _container->start(0);
+              _container->start(this);
             }
           catch(Exception& e)
             {
@@ -658,7 +658,7 @@ void PyFuncNode::loadRemote()
       throw Exception(what);
     }
 
-  Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(0);
+  Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(this);
   try
     {
       _pynode = objContainer->createPyNode(getName().c_str(),getScript().c_str());
@@ -1089,7 +1089,7 @@ std::string PyFuncNode::getContainerLog()
   std::string msg;
   try
     {
-      Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(0);
+      Engines::Container_var objContainer=((SalomeContainer*)_container)->getContainerPtr(this);
       CORBA::String_var logname = objContainer->logfilename();
       DEBTRACE(logname);
       msg=logname;