Skip to content

Commit

Permalink
uORBManager.cpp: Fix issue with registerCallback
Browse files Browse the repository at this point in the history
A curly brace was misplaced, calls to unlock_cb_list() etc belong within
the statement

if (cb_lock >= 0) {

}
  • Loading branch information
pussuw committed May 8, 2024
1 parent 981b7ea commit d945879
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions platforms/common/uORB/uORBManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,16 +567,16 @@ uORB::Manager::registerCallback(orb_advert_t &node_handle, SubscriptionCallback
// keep the cb list locked; this prevents the callback thread from trying to access the callback item before it is registered to the device node
#endif
ret = uORB::DeviceNode::register_callback(node_handle, callback_sub, cb_lock, last_update,

interval_us, cb_handle);
#ifndef CONFIG_BUILD_FLAT
}

if (!ret) {
per_process_cb_list.remove(callback_sub);
if (!ret) {
per_process_cb_list.remove(callback_sub);
}

unlock_cb_list();
}

unlock_cb_list();
#endif

return ret;
Expand Down

0 comments on commit d945879

Please sign in to comment.