Skip to content

Commit 6bab79d

Browse files
Add domain_id to map so spy mode can start (#292)
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
1 parent ee3fa62 commit 6bab79d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Engine.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ void Engine::init_monitor(
398398
{
399399
shared_init_monitor_(domain_id);
400400
active_monitors_[discovery_server_locators] = domain_id;
401+
// Spy mode searches monitor by domain_name (usual id), so that mapping is needed
402+
// to be able to find the monitor in the future when a topic spy is started
403+
active_monitors_[QString::fromStdString(backend_connection_.get_name(domain_id))] = domain_id;
401404
}
402405
else
403406
{
@@ -428,6 +431,9 @@ void Engine::init_monitor_with_profile(
428431
{
429432
shared_init_monitor_(domain_id);
430433
active_monitors_[profile_name] = domain_id;
434+
// Spy mode searches monitor by domain_name (usual id), so that mapping is needed
435+
// to be able to find the monitor in the future when a topic spy is started
436+
active_monitors_[QString::fromStdString(backend_connection_.get_name(domain_id))] = domain_id;
431437
}
432438
else
433439
{

0 commit comments

Comments
 (0)