Skip to content

Commit da9d8d3

Browse files
committed
iox-#23 fixed response generation for runnable creation
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <[email protected]>
1 parent 77c84ae commit da9d8d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

iceoryx_posh/source/roudi/roudi_process.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,14 @@ void ProcessManager::addRunnableForProcess(const std::string& f_process, const s
377377
if (nullptr != l_process)
378378
{
379379
runtime::RunnableData* l_runnable = m_shmMgr.acquireRunnableData(f_process, f_runnable);
380-
size_t l_ptr = reinterpret_cast<size_t>(l_runnable);
380+
381+
RelativePointer::id_t segmentId = m_shmMgr.getShmInterface().getSegmentId();
382+
auto offset = RelativePointer::getOffset(segmentId, l_runnable);
381383

382384
runtime::MqMessage l_sendBuffer;
383385
l_sendBuffer << runtime::mqMessageTypeToString(runtime::MqMessageType::CREATE_RUNNABLE_ACK)
384-
<< std::to_string(l_ptr);
386+
<< std::to_string(offset) << std::to_string(segmentId);
387+
385388
l_process->sendToMQ(l_sendBuffer);
386389
m_processIntrospection->addRunnable(cxx::CString100(f_process.c_str()), cxx::CString100(f_runnable.c_str()));
387390
DEBUG_PRINTF("Created new runnable %s for application %s\n", f_runnable.c_str(), f_process.c_str());

0 commit comments

Comments
 (0)