From beed0223d4bed1b12c89e5bb0491dfbe2eaf0859 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 15 May 2017 11:48:32 -0400 Subject: [PATCH] Fix: muxer: handle CANCELED status MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- plugins/utils/muxer/muxer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.34.1