From 15c16dd3ba7bfab6e1dbcc2c9bdd4a676c8d1ee5 Mon Sep 17 00:00:00 2001 From: palvarben <145467840+palvarben@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:15:44 +0100 Subject: [PATCH] fix(zenoh): allow mapping several instances of the same uORB topic (#29201) --- src/modules/zenoh/zenoh_config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/zenoh/zenoh_config.cpp b/src/modules/zenoh/zenoh_config.cpp index aa1fd0b2fef..cbdeff91ca7 100644 --- a/src/modules/zenoh/zenoh_config.cpp +++ b/src/modules/zenoh/zenoh_config.cpp @@ -109,8 +109,8 @@ int Zenoh_Config::AddPubSub(char *topic, char *datatype, int instance_no, const while (getPubSubMapping(f_topic, f_type, &f_new_instance, filename) > 0) { if (strcmp(topic, f_topic) == 0 - || strcmp(datatype, f_type) == 0) { - printf("Already mapped to uORB %s -> %s\n", f_type, f_topic); + || (strcmp(datatype, f_type) == 0 && instance_no == f_new_instance)) { + printf("Already mapped to uORB %s (instance %d) -> %s\n", f_type, f_new_instance, f_topic); return 0; }