Remove the need to implement the notification iterator's "get" method
[babeltrace.git] / plugins / muxer / muxer.c
index b0cdfe5922a1e53d0265b370e55dd29be6ab4f4e..6fa10f3844f5bd41acf4a38f242d2ace1eb3eae8 100644 (file)
@@ -86,17 +86,14 @@ error:
 }
 
 static
-struct bt_notification *muxer_iterator_get(
+struct bt_notification_iterator_next_return muxer_iterator_next(
                struct bt_private_notification_iterator *iterator)
 {
-       return NULL;
-}
+       struct bt_notification_iterator_next_return ret = {
+               .status = BT_NOTIFICATION_ITERATOR_STATUS_ERROR,
+       };
 
-static
-enum bt_notification_iterator_status muxer_iterator_next(
-               struct bt_private_notification_iterator *iterator)
-{
-       return BT_NOTIFICATION_ITERATOR_STATUS_OK;
+       return ret;
 }
 
 /* Initialize plug-in entry points. */
@@ -104,8 +101,7 @@ BT_PLUGIN(muxer);
 BT_PLUGIN_DESCRIPTION("Babeltrace Trace Muxer Plug-In.");
 BT_PLUGIN_AUTHOR("Jérémie Galarneau");
 BT_PLUGIN_LICENSE("MIT");
-BT_PLUGIN_FILTER_COMPONENT_CLASS(muxer, muxer_iterator_get,
-       muxer_iterator_next);
+BT_PLUGIN_FILTER_COMPONENT_CLASS(muxer, muxer_iterator_next);
 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(muxer,
        "Time-correlate multiple traces.");
 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(muxer, muxer_component_init);
This page took 0.025114 seconds and 4 git commands to generate.