Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update service/client request/response API error returns #249

Merged
merged 7 commits into from
Sep 29, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3685,10 +3685,17 @@ extern "C" rmw_ret_t rmw_send_request(
int64_t * sequence_id)
{
static std::atomic_uint next_request_id;
RET_NULL(client);
RET_WRONG_IMPLID(client);
RET_NULL(ros_request);
RET_NULL(sequence_id);
RMW_CHECK_ARGUMENT_FOR_NULL(client, RMW_RET_INVALID_ARGUMENT);

RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
client handle,
Lobotuerk marked this conversation as resolved.
Show resolved Hide resolved
client->implementation_identifier, eclipse_cyclonedds_identifier,
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);

RMW_CHECK_ARGUMENT_FOR_NULL(ros_request, RMW_RET_INVALID_ARGUMENT);

Lobotuerk marked this conversation as resolved.
Show resolved Hide resolved
RMW_CHECK_ARGUMENT_FOR_NULL(sequence_id, RMW_RET_INVALID_ARGUMENT);

auto info = static_cast<CddsClient *>(client->data);
cdds_request_header_t header;
header.guid = info->client.pub->pubiid;
Expand Down