Skip to content

Commit

Permalink
iox-#1361 Add workaround for iox-#2055
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 24, 2023
1 parent 577c8fc commit 6774499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion iceoryx_posh/source/roudi/process_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ bool ProcessManager::addProcess(const RuntimeName_t& name,
return false;
}
auto heartbeatPoolIndex = HeartbeatPool::Index::INVALID;
iox::UntypedRelativePointer::offset_t heartbeatOffset{iox::UntypedRelativePointer::NULL_POINTER_OFFSET};
/// @todo iox-#2055 this workaround is required sind the conversion of edge cases is broken
constexpr uint8_t IOX_2055_WORKAROUND{1};
iox::UntypedRelativePointer::offset_t heartbeatOffset{iox::UntypedRelativePointer::NULL_POINTER_OFFSET
- IOX_2055_WORKAROUND};
if (isMonitored)
{
auto heartbeat = m_heartbeatPool->emplace();
Expand Down
4 changes: 3 additions & 1 deletion iceoryx_posh/source/runtime/ipc_runtime_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ IpcRuntimeInterface::RegAckResult IpcRuntimeInterface::waitForRegAck(int64_t tra
cxx::convert::fromString(receiveBuffer.getElementAtIndex(4U).c_str(), m_segmentId);
UntypedRelativePointer::offset_t heartbeatOffset{UntypedRelativePointer::NULL_POINTER_OFFSET};
cxx::convert::fromString(receiveBuffer.getElementAtIndex(5U).c_str(), heartbeatOffset);
if (heartbeatOffset != UntypedRelativePointer::NULL_POINTER_OFFSET)
/// @todo iox-#2055 this workaround is required sind the conversion of edge cases is broken
constexpr uint8_t IOX_2055_WORKAROUND{1};
if (heartbeatOffset != (UntypedRelativePointer::NULL_POINTER_OFFSET - IOX_2055_WORKAROUND))
{
m_heartbeatAddressOffset = heartbeatOffset;
}
Expand Down

0 comments on commit 6774499

Please sign in to comment.