[openrtm-commit:03377] r3449 - trunk/OpenRTM-aist/src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 11月 20日 (火) 18:59:00 JST
Author: miyamoto
Date: 2018-11-20 18:59:00 +0900 (Tue, 20 Nov 2018)
New Revision: 3449
Modified:
trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextBase.cpp
trunk/OpenRTM-aist/src/lib/rtm/PeriodicECSharedComposite.cpp
Log:
[compat, bugfix]
Modified: trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextBase.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextBase.cpp 2018-11-19 09:34:10 UTC (rev 3448)
+++ trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextBase.cpp 2018-11-20 09:59:00 UTC (rev 3449)
@@ -111,6 +111,10 @@
RTC::ReturnCode_t ExecutionContextBase::
bindComponent(RTC::RTObject_impl* rtc)
{
+ if (rtc == NULL)
+ {
+ return RTC::BAD_PARAMETER;
+ }
setOwner(rtc->getObjRef());
return m_worker.bindComponent(rtc);
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/PeriodicECSharedComposite.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/PeriodicECSharedComposite.cpp 2018-11-19 09:34:10 UTC (rev 3448)
+++ trunk/OpenRTM-aist/src/lib/rtm/PeriodicECSharedComposite.cpp 2018-11-20 09:59:00 UTC (rev 3449)
@@ -158,8 +158,13 @@
RTC_DEBUG(("remove_member(id = %s)", id));
for (MemIt it(m_rtcMembers.begin()); it != m_rtcMembers.end();)
{
+ CORBA::Boolean result;
+ result = ::SDOPackage::Organization_impl::remove_member(id);
+
+
Member& member(*it);
- if (strncmp(id, member.profile_->instance_name, strlen(id)))
+ size_t len = max(strlen(id), strlen(member.profile_->instance_name));
+ if (strncmp(id, member.profile_->instance_name, len))
{
++it;
continue;
@@ -173,11 +178,12 @@
removeOrganizationFromTarget(member);
startOwnedEC(member);
it = m_rtcMembers.erase(it);
+
+ return result;
}
-
- CORBA::Boolean result;
- result = ::SDOPackage::Organization_impl::remove_member(id);
- return result;
+
+
+ return false;
}
/*!
@@ -193,6 +199,7 @@
updateExportedPortsList();
MemIt it(m_rtcMembers.begin());
MemIt it_end(m_rtcMembers.end());
+
while (it != it_end)
{
Member& member(*it);
openrtm-commit メーリングリストの案内