Skip to content

Commit

Permalink
Refs #21185: adjust because write returns ret_code
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf committed Jul 17, 2024
1 parent b2099dd commit f1f7f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions examples/cpp/flow_control/PublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ void PublisherApp::run()
// Publication code
FlowControl msg;

/* Initialize your structure here */

while (!is_stopped() && ((samples_ == 0) || (msg.index() < samples_)))
{
msg.index(msg.index() + 1);
Expand Down Expand Up @@ -229,7 +227,7 @@ bool PublisherApp::publish(

if (!is_stopped())
{
ret = writer_->write(&msg);
ret = (RETCODE_OK == writer_->write(&msg));
}
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/flow_control/PublisherApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <atomic>
#include <condition_variable>
#include <cstdlib>
#include <cstdint>
#include <mutex>

#include <fastdds/dds/domain/DomainParticipant.hpp>
Expand Down

0 comments on commit f1f7f9e

Please sign in to comment.