Return error when querying a non-existent node
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
edab551520
commit
0765e5696d
1 changed files with 9 additions and 1 deletions
|
@ -1863,7 +1863,15 @@ static rmw_ret_t get_node_guids (const char *node_name, const char *node_namespa
|
||||||
}
|
}
|
||||||
return true; /* do keep looking - what if there are many? */
|
return true; /* do keep looking - what if there are many? */
|
||||||
};
|
};
|
||||||
return do_for_node_user_data (oper);
|
rmw_ret_t ret = do_for_node_user_data (oper);
|
||||||
|
if (ret != RMW_RET_OK) {
|
||||||
|
return ret;
|
||||||
|
} else if (guids.size () == 0) {
|
||||||
|
/* It appears the get_..._by_node operations are supposed to return ERROR if no such node exists */
|
||||||
|
return RMW_RET_ERROR;
|
||||||
|
} else {
|
||||||
|
return RMW_RET_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static rmw_ret_t get_endpoint_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, bool no_demangle, rmw_names_and_types_t *tptyp, bool subs, bool pubs)
|
static rmw_ret_t get_endpoint_names_and_types_by_node (const rmw_node_t *node, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, bool no_demangle, rmw_names_and_types_t *tptyp, bool subs, bool pubs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue