@@ -64,7 +64,7 @@ rmw_create_subscription(
6464 RMW_SET_ERROR_MSG ("node handle is null" );
6565 } else if (!type_support ) {
6666 RMW_SET_ERROR_MSG ("type support is null" );
67- } else if (strcmp (node -> implementation_identifier , rmw_get_implementation_identifier ()) != 0 ) {
67+ } else if (! is_uxrce_rmw_identifier_valid (node -> implementation_identifier ) ) {
6868 RMW_SET_ERROR_MSG ("node handle not from this implementation" );
6969 } else if (!topic_name || strlen (topic_name ) == 0 ) {
7070 RMW_SET_ERROR_MSG ("subscription topic is null or empty string" );
@@ -267,7 +267,7 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription)
267267 if (!node ) {
268268 RMW_SET_ERROR_MSG ("node handle is null" );
269269 result_ret = RMW_RET_ERROR ;
270- } else if (strcmp (node -> implementation_identifier , rmw_get_implementation_identifier ()) != 0 ) {
270+ } else if (! is_uxrce_rmw_identifier_valid (node -> implementation_identifier ) ) {
271271 RMW_SET_ERROR_MSG ("node handle not from this implementation" );
272272 result_ret = RMW_RET_ERROR ;
273273 } else if (!node -> data ) {
@@ -276,10 +276,7 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription)
276276 } else if (!subscription ) {
277277 RMW_SET_ERROR_MSG ("subscription handle is null" );
278278 result_ret = RMW_RET_ERROR ;
279- } else if (strcmp (
280- subscription -> implementation_identifier , // NOLINT
281- rmw_get_implementation_identifier ()) != 0 )
282- {
279+ } else if (!is_uxrce_rmw_identifier_valid (subscription -> implementation_identifier )) {
283280 RMW_SET_ERROR_MSG ("subscription handle not from this implementation" );
284281 result_ret = RMW_RET_ERROR ;
285282 } else if (!subscription -> data ) {
0 commit comments