forked from Archive/PX4-Autopilot
Fix comparing orb_metadata in uORB::DeviceNode::publish
Don't compare pointers to metadata, but the metadata contents. In protected/kernel build there are two sets of metadata, on on kernel side and another in user side. Thus the comparison of pointers would just always fail. Compare orb_id instead Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
parent
0b9505453d
commit
bb307cd462
|
@ -323,7 +323,7 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
|
|||
}
|
||||
|
||||
/* check if the orb meta data matches the publication */
|
||||
if (devnode->_meta != meta) {
|
||||
if (devnode->_meta->o_id != meta->o_id) {
|
||||
errno = EINVAL;
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue