From: Mathieu Desnoyers Date: Mon, 15 May 2017 15:48:32 +0000 (-0400) Subject: Fix: muxer: handle CANCELED status X-Git-Tag: v2.0.0-pre1~244 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=beed0223d4bed1b12c89e5bb0491dfbe2eaf0859 Fix: muxer: handle CANCELED status Since commit bbd6694a2 "Collect useless graph's connections", the lttng-live component may return a CANCELED state to the muxer. The muxer should deal with this state as an "END" state. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/utils/muxer/muxer.c b/plugins/utils/muxer/muxer.c index 6fefcf38..e0553423 100644 --- a/plugins/utils/muxer/muxer.c +++ b/plugins/utils/muxer/muxer.c @@ -400,7 +400,8 @@ enum bt_notification_iterator_status muxer_upstream_notif_iter_next( */ muxer_upstream_notif_iter->is_valid = false; break; - case BT_NOTIFICATION_ITERATOR_STATUS_END: + case BT_NOTIFICATION_ITERATOR_STATUS_END: /* Fall-through. */ + case BT_NOTIFICATION_ITERATOR_STATUS_CANCELED: /* * Notification iterator reached the end: release it. It * won't be considered again to find the youngest @@ -764,7 +765,8 @@ struct bt_notification_iterator_next_return muxer_notif_iter_do_next( muxer_notif_iter, &muxer_upstream_notif_iter, &next_return_ts); if (next_return.status < 0 || - next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_END) { + next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_END || + next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_CANCELED) { goto end; }