Trimmer fix: forward evaluation result to downstream components
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Jan 2017 17:52:11 +0000 (12:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:08 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/trimmer/iterator.c

index 133d63dda94ca97e7bcd3307e477ee6aef301cf2..0c6b2936cdb742f711ef7be7051ff7342b135207 100644 (file)
@@ -378,9 +378,6 @@ enum bt_notification_iterator_status evaluate_packet_notification(
         * packet.
         */
        in_range = (pkt_end_ns >= begin_ns) && (pkt_begin_ns <= end_ns);
-       if (pkt_begin_ns > end_ns) {
-               ret = BT_NOTIFICATION_ITERATOR_STATUS_END;
-       }
 end:
        *_packet_in_range = in_range;
        bt_put(packet);
@@ -468,6 +465,10 @@ enum bt_notification_iterator_status trimmer_iterator_next(
                } else {
                        bt_put(notification);
                }
+
+               if (ret != BT_NOTIFICATION_ITERATOR_STATUS_OK) {
+                       break;
+               }
        }
 end:
        bt_put(source_it);
This page took 0.024993 seconds and 4 git commands to generate.