@@ -42,20 +42,20 @@ rmw_node_t * create_node(
4242 goto fail ;
4343 }
4444
45- rmw_uxrce_node_t * node_info = (rmw_uxrce_node_t * )memory_node -> data ;
45+ rmw_uxrce_node_t * custom_node = (rmw_uxrce_node_t * )memory_node -> data ;
4646
47- node_info -> context = context -> impl ;
47+ custom_node -> context = context -> impl ;
4848
4949 node_handle = rmw_node_allocate ();
5050 if (!node_handle ) {
5151 RMW_SET_ERROR_MSG ("failed to allocate rmw_node_t" );
5252 return NULL ;
5353 }
5454
55- node_info -> rmw_handle = node_handle ;
55+ custom_node -> rmw_handle = node_handle ;
5656
5757 node_handle -> implementation_identifier = rmw_get_implementation_identifier ();
58- node_handle -> data = node_info ;
58+ node_handle -> data = custom_node ;
5959 node_handle -> name = (const char * )(rmw_allocate (sizeof (char ) * (strlen (name ) + 1 )));
6060 if (!node_handle -> name ) {
6161 RMW_SET_ERROR_MSG ("failed to allocate memory" );
@@ -72,8 +72,8 @@ rmw_node_t * create_node(
7272 }
7373 memcpy ((char * )node_handle -> namespace_ , namespace_ , strlen (namespace_ ) + 1 );
7474
75- node_info -> participant_id =
76- uxr_object_id (node_info -> context -> id_participant ++ , UXR_PARTICIPANT_ID );
75+ custom_node -> participant_id =
76+ uxr_object_id (custom_node -> context -> id_participant ++ , UXR_PARTICIPANT_ID );
7777 uint16_t participant_req = UXR_INVALID_REQUEST_ID ;
7878
7979#ifdef RMW_UXRCE_USE_REFS
@@ -85,9 +85,9 @@ rmw_node_t * create_node(
8585 return NULL ;
8686 }
8787 participant_req = uxr_buffer_create_participant_ref (
88- & node_info -> context -> session ,
89- * node_info -> context -> creation_destroy_stream ,
90- node_info -> participant_id ,
88+ & custom_node -> context -> session ,
89+ * custom_node -> context -> creation_destroy_stream ,
90+ custom_node -> participant_id ,
9191 (uint16_t )domain_id ,
9292 rmw_uxrce_entity_naming_buffer , UXR_REPLACE | UXR_REUSE );
9393#else
@@ -100,15 +100,18 @@ rmw_node_t * create_node(
100100 }
101101
102102 participant_req = uxr_buffer_create_participant_bin (
103- & node_info -> context -> session ,
104- * node_info -> context -> creation_destroy_stream ,
105- node_info -> participant_id ,
103+ & custom_node -> context -> session ,
104+ * custom_node -> context -> creation_destroy_stream ,
105+ custom_node -> participant_id ,
106106 domain_id ,
107107 xrce_node_name ,
108108 UXR_REPLACE | UXR_REUSE );
109109#endif /* ifdef RMW_UXRCE_USE_REFS */
110110
111- if (!run_xrce_session (node_info -> context , participant_req )) {
111+ if (!run_xrce_session (
112+ custom_node -> context , participant_req ,
113+ custom_node -> context -> creation_timeout ))
114+ {
112115 rmw_uxrce_fini_node_memory (node_handle );
113116 return NULL ;
114117 }
@@ -209,7 +212,10 @@ rmw_ret_t rmw_destroy_node(
209212 * custom_node -> context -> creation_destroy_stream ,
210213 custom_node -> participant_id );
211214
212- if (!run_xrce_session (custom_node -> context , delete_participant )) {
215+ if (!run_xrce_session (
216+ custom_node -> context , delete_participant ,
217+ custom_node -> context -> destroy_timeout ))
218+ {
213219 ret = RMW_RET_TIMEOUT ;
214220 }
215221
0 commit comments