Fix SEEK_BEGIN for streams that do not contain any event
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 9 Nov 2012 18:02:59 +0000 (13:02 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 9 Nov 2012 18:02:59 +0000 (13:02 -0500)
Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/iterator.c

index 411b377ecf8cda2e6a1ec2ada151e0ed3d944eae..c50b0ef36c18085496b0933832b9dd3df5ec3044 100644 (file)
@@ -471,6 +471,10 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
                                        if (ret != 0 && ret != EOF) {
                                                goto error;
                                        }
+                                       if (ret == EOF) {
+                                               /* Do not add EOF streams */
+                                               continue;
+                                       }
                                        ret = heap_insert(iter->stream_heap, file_stream);
                                        if (ret)
                                                goto error;
This page took 0.027539 seconds and 4 git commands to generate.