Skip to content

Commit

Permalink
Three small patches to pass the tests
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Sep 7, 2023
1 parent 1c5cb9e commit 3aa16ba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ void DdsBridge::add_writers_to_tracks_(
std::move(writers_of_reader),
payload_pool_,
thread_pool_);

if (enabled_)
{
tracks_[id]->enable();
}
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions ddspipe_core/src/cpp/core/DdsPipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,8 @@ void DdsPipe::removed_endpoint_nts_(

if (it_bridge == bridges_.end())
{
// The bridge does not exist. Error.
logError(DDSPIPE,
"Error finding Bridge for topic " << topic <<
". The Bridge does not exist.");
// The bridge does not exist. We cannot remove the writer. Exit.
return;
}
else if (dynamic_tracks_)
{
Expand Down
7 changes: 6 additions & 1 deletion ddspipe_core/src/cpp/testing/random_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ Endpoint random_endpoint(
unsigned int seed /* = 0 */)
{
Endpoint endpoint;

endpoint.active = (seed % 2);
endpoint.guid = random_guid(seed);
endpoint.discoverer_participant_id = random_participant_id(seed);
endpoint.kind = random_endpoint_kind(seed);
endpoint.topic = random_dds_topic(seed);

// The discoverer participant id cannot be random.
// It must belong to an actual participant or be an empty string.
endpoint.discoverer_participant_id = "";

return endpoint;
}

Expand Down

0 comments on commit 3aa16ba

Please sign in to comment.