[openrtm-commit:00587] r643 - trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 1月 16日 (月) 17:04:35 JST
Author: fsi-katami
Date: 2012-01-16 17:04:34 +0900 (Mon, 16 Jan 2012)
New Revision: 643
Modified:
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
Log:
ManagerServant::delete_component() has been changed. Now it just call RTC's exit() function, instead of calling Manager's deleteComp().
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2012-01-16 05:54:22 UTC (rev 642)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2012-01-16 08:04:34 UTC (rev 643)
@@ -690,7 +690,20 @@
public RTC.ReturnCode_t delete_component(final String instance_name) {
rtcout.println(Logbuf.TRACE, "delete_component("+instance_name+")");
- m_mgr.deleteComponent(instance_name);
+ RTObject_impl comp = m_mgr.getComponent(instance_name);
+ if (comp == null) {
+ rtcout.println(Logbuf.WARN,"No such component exists: "
+ + instance_name);
+ return ReturnCode_t.BAD_PARAMETER;
+ }
+ try {
+ comp.exit();
+ }
+ catch (org.omg.CORBA.SystemException ex) { // never come here
+ rtcout.println(Logbuf.ERROR,
+ "Unknown exception was raised, when RTC was finalized.");
+ return ReturnCode_t.RTC_ERROR;
+ }
return ReturnCode_t.RTC_OK;
}
openrtm-commit メーリングリストの案内