Stop trimmer iteration when end bound is reached
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 17 Dec 2016 16:05:26 +0000 (11:05 -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 e80bb34ec66b2adf5a141de45c3ab04c15a72a3d..133d63dda94ca97e7bcd3307e477ee6aef301cf2 100644 (file)
@@ -260,6 +260,7 @@ evaluate_event_notification(struct bt_notification *notification,
        }
        if (end->set && ts > end->value) {
                in_range = false;
+               ret = BT_NOTIFICATION_ITERATOR_STATUS_END;
        }
 end:
        bt_put(event);
@@ -377,6 +378,9 @@ 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);
This page took 0.02479 seconds and 4 git commands to generate.