[openrtm-commit:00323] r440 - branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2011年 8月 6日 (土) 00:24:32 JST


Author: kurihara
Date: 2011-08-06 00:24:32 +0900 (Sat, 06 Aug 2011)
New Revision: 440

Modified:
   branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
Log:
The bug about onAddPort and onRemovePort have been fixed.

Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2011-08-05 15:23:50 UTC (rev 439)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2011-08-05 15:24:32 UTC (rev 440)
@@ -2678,10 +2678,10 @@
     elif isinstance(port, OpenRTM_aist.PortBase):
       self._rtcout.RTC_TRACE("addPort(PortBase)")
       port.setOwner(self.getObjRef())
+      self.onAddPort(port.getPortProfile())
 
     elif isinstance(port, RTC._objref_PortService):
       self._rtcout.RTC_TRACE("addPort(PortService)")
-    self.onAddPort(port.getPortProfile())
     return self._portAdmin.addPort(port)
 
 
@@ -2886,7 +2886,8 @@
   # new interface. since 1.0.0-RELEASE
   def removePort(self, port):
     self._rtcout.RTC_TRACE("removePort()")
-    self.onRemovePort(port.getPortProfile())
+    if isinstance(port, OpenRTM_aist.PortBase) or isinstance(port, OpenRTM_aist.CorbaPort):
+      self.onRemovePort(port.getPortProfile())
     return self._portAdmin.removePort(port)
 
 



openrtm-commit メーリングリストの案内