Use right event info for RMW_EVENT_LIVELINESS_LOST

Signed-off-by: Dan Rose <dan@digilabs.io>
This commit is contained in:
Dan Rose 2019-10-17 19:31:37 -05:00 committed by eboasson
parent 79e7046784
commit d47de860aa

View file

@ -1552,10 +1552,10 @@ extern "C" rmw_ret_t rmw_take_event(
} }
case RMW_EVENT_LIVELINESS_LOST: { case RMW_EVENT_LIVELINESS_LOST: {
auto ei = static_cast<rmw_requested_deadline_missed_status_t *>(event_info); auto ei = static_cast<rmw_liveliness_lost_status_t *>(event_info);
auto pub = static_cast<CddsPublisher *>(event_handle->data); auto pub = static_cast<CddsPublisher *>(event_handle->data);
dds_requested_deadline_missed_status_t st; dds_liveliness_lost_status_t st;
if (dds_get_requested_deadline_missed_status(pub->pubh, &st) < 0) { if (dds_get_liveliness_lost_status(pub->pubh, &st) < 0) {
*taken = false; *taken = false;
return RMW_RET_ERROR; return RMW_RET_ERROR;
} else { } else {