[openrtm-commit:02927] r3081 - in trunk/OpenRTM-aist/src/lib: coil/posix/coil coil/win32/coil rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 11月 20日 (月) 13:09:17 JST
Author: miyamoto
Date: 2017-11-20 13:09:16 +0900 (Mon, 20 Nov 2017)
New Revision: 3081
Modified:
trunk/OpenRTM-aist/src/lib/coil/posix/coil/SharedMemory.cpp
trunk/OpenRTM-aist/src/lib/coil/win32/coil/SharedMemory.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortSHMProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMConsumer.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/SharedMemoryPort.cpp
Log:
[compat,->RELENG_1_2] bug fix.
Modified: trunk/OpenRTM-aist/src/lib/coil/posix/coil/SharedMemory.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/posix/coil/SharedMemory.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/coil/posix/coil/SharedMemory.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -83,6 +83,7 @@
std::swap(this->m_shm_address, tmp.m_shm_address);
std::swap(this->m_shm, tmp.m_shm);
std::swap(this->m_fd, tmp.m_fd);
+ std::swap(this->m_file_create, tmp.m_file_create);
return *this;
}
Modified: trunk/OpenRTM-aist/src/lib/coil/win32/coil/SharedMemory.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/win32/coil/SharedMemory.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/coil/win32/coil/SharedMemory.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -35,7 +35,7 @@
: m_memory_size(0),
m_shm(NULL),
m_file_create(false),
- m_handle(NULL)
+ m_handle(NULL)
{
}
@@ -65,6 +65,7 @@
m_shm_address = rhs.m_shm_address;
m_shm = rhs.m_shm;
m_handle = rhs.m_handle;
+ m_file_create = rhs.m_file_create;
}
/*!
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortSHMProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortSHMProvider.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortSHMProvider.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -33,7 +33,8 @@
* @endif
*/
InPortSHMProvider::InPortSHMProvider(void)
- : m_buffer(0)
+ : m_buffer(0),
+ m_connector(NULL)
{
// PortProfile setting
setInterfaceType("shared_memory");
@@ -122,7 +123,7 @@
throw (CORBA::SystemException)
{
RTC_PARANOID(("InPortSHMProvider::put()"));
- if (m_buffer == 0)
+ if (m_buffer == 0)
{
return ::OpenRTM::PORT_ERROR;
}
@@ -205,8 +206,7 @@
return ::OpenRTM::UNKNOWN_ERROR;
}
- onReceiverError(data);
- return ::OpenRTM::UNKNOWN_ERROR;
+
}
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMConsumer.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMConsumer.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMConsumer.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -30,6 +30,7 @@
* @endif
*/
OutPortSHMConsumer::OutPortSHMConsumer()
+ : m_listeners(NULL)
{
rtclog.setName("OutPortSHMConsumer");
@@ -295,8 +296,6 @@
return UNKNOWN_ERROR;
}
- onSenderError();
- return UNKNOWN_ERROR;
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMProvider.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortSHMProvider.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -32,7 +32,9 @@
* @endif
*/
OutPortSHMProvider::OutPortSHMProvider(void)
- : m_buffer(0)
+ : m_buffer(0),
+ m_memory_size(0),
+ m_endian(true)
{
// PortProfile setting
setInterfaceType("shared_memory");
@@ -245,8 +247,6 @@
return ::OpenRTM::UNKNOWN_ERROR;
}
- onSenderError();
- return ::OpenRTM::UNKNOWN_ERROR;
}
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/SharedMemoryPort.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/SharedMemoryPort.cpp 2017-11-17 08:53:21 UTC (rev 3080)
+++ trunk/OpenRTM-aist/src/lib/rtm/SharedMemoryPort.cpp 2017-11-20 04:09:16 UTC (rev 3081)
@@ -105,7 +105,7 @@
*
* @endif
*/
- int SharedMemoryPort::string_to_MemorySize(std::string size_str)
+ int SharedMemoryPort::string_to_MemorySize(std::string size_str)
{
int memory_size = DEFAULT_MEMORY_SIZE;
std::string size_str_n = coil::normalize(size_str);
@@ -118,22 +118,22 @@
std::string value_str = size_str_n.substr(0, size_str_n.size() - 1);
int value = 0;
- coil::stringTo(value, value_str.c_str());
-
- if (size_str_n.substr(size_str_n.size() - 1, 1) == unit_str_M)
+ if(coil::stringTo(value, value_str.c_str()))
{
- memory_size = 1048576 * value;
+ if (size_str_n.substr(size_str_n.size() - 1, 1) == unit_str_M)
+ {
+ memory_size = 1048576 * value;
+ }
+ else if (size_str_n.substr(size_str_n.size() - 1, 1) == unit_str_k)
+ {
+
+ memory_size = 1024 * value;
+ }
+ else
+ {
+ memory_size = value;
+ }
}
- else if (size_str_n.substr(size_str_n.size() - 1, 1) == unit_str_k)
- {
-
- memory_size = 1024 * value;
- }
- else
- {
- memory_size = value;
- }
-
}
return memory_size;
More information about the openrtm-commit
mailing list