Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in a missing data_reader check when creating subscription. (#697)
The end stanza of create_datareader() is supposed to be attempting to create a datareader with the underlying Fast-DDS library. If creation of the datareader returns a valid pointer, we've succeeded, and if it returns a nullptr, it has failed. However, there were two separate problems of the logic checking for these conditions: 1. It was checking the datareader pointer-to-a-pointer, which should always be non-null. What it really meant to check was the datareader pointer (dereferenced). 2. There is a fallback mechanism for when unique network flow endpoints were optionally required. The problem with that is that when using the fallback, we never check again to make sure the fallback was successful. Therefore, if we failed for another reason (like security), we would not discover it until a crash later on. This commit fixes both of these issues. Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information