@@ -148,15 +148,17 @@ rmw_create_publisher(
148148 RMW_SET_ERROR_MSG ("failed to generate xml request for publisher creation" );
149149 goto fail ;
150150 }
151- publisher_req = uxr_buffer_create_publisher_xml (& custom_publisher -> owner_node -> context -> session ,
152- custom_node -> context -> reliable_output , custom_publisher -> publisher_id ,
153- custom_node -> participant_id , xml_buffer , UXR_REPLACE );
151+ publisher_req = uxr_buffer_create_publisher_xml (
152+ & custom_publisher -> owner_node -> context -> session ,
153+ custom_node -> context -> reliable_output ,
154+ custom_publisher -> publisher_id ,
155+ custom_node -> participant_id , xml_buffer , UXR_REPLACE );
154156 #elif defined(MICRO_XRCEDDS_USE_REFS )
155- // TODO(BORJA) Publisher by reference does not make sense
156- // in current micro XRCE-DDS implementation.
157- publisher_req = uxr_buffer_create_publisher_xml ( custom_publisher -> context -> session ,
158- custom_node -> context -> reliable_output , custom_publisher -> publisher_id ,
159- custom_node -> participant_id , "" , UXR_REPLACE );
157+ publisher_req = uxr_buffer_create_publisher_xml (
158+ & custom_publisher -> owner_node -> context -> session ,
159+ custom_node -> context -> reliable_output ,
160+ custom_publisher -> publisher_id ,
161+ custom_node -> participant_id , "" , UXR_REPLACE );
160162 #endif
161163
162164 custom_publisher -> datawriter_id = uxr_object_id (custom_node -> id_gen ++ , UXR_DATAWRITER_ID );
@@ -170,17 +172,21 @@ rmw_create_publisher(
170172 }
171173
172174 datawriter_req = uxr_buffer_create_datawriter_xml (
173- & custom_publisher -> owner_node -> context -> session , custom_node -> context -> reliable_output , custom_publisher -> datawriter_id ,
175+ & custom_publisher -> owner_node -> context -> session ,
176+ custom_node -> context -> reliable_output ,
177+ custom_publisher -> datawriter_id ,
174178 custom_publisher -> publisher_id , xml_buffer , UXR_REPLACE );
175179 #elif defined(MICRO_XRCEDDS_USE_REFS )
176180 if (!build_datawriter_profile (topic_name , profile_name , sizeof (profile_name ))) {
177181 RMW_SET_ERROR_MSG ("failed to generate xml request for node creation" );
178182 goto fail ;
179183 }
180184
181- datawriter_req = uxr_buffer_create_datawriter_ref (custom_publisher -> context -> session ,
182- custom_node -> context -> reliable_output , custom_publisher -> datawriter_id ,
183- custom_publisher -> publisher_id , profile_name , UXR_REPLACE );
185+ datawriter_req = uxr_buffer_create_datawriter_ref (
186+ & custom_publisher -> owner_node -> context -> session ,
187+ custom_node -> context -> reliable_output ,
188+ custom_publisher -> datawriter_id ,
189+ custom_publisher -> publisher_id , profile_name , UXR_REPLACE );
184190 #endif
185191
186192 rmw_publisher -> data = custom_publisher ;
0 commit comments