Fix live-comm: only apply retry timeout for already seen inactive indexes.
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 24 Jul 2017 20:06:18 +0000 (16:06 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2017 19:22:17 +0000 (15:22 -0400)
Tested-by: Anton Smyk <anton.smyk@itiviti.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/lttng-live/lttng-live-comm.c

index c19cc6460b5b06ee07ed46e6e5b5f54adf17d80a..a1c95bbc31238504e82186e522aae14d0244749c 100644 (file)
@@ -1033,6 +1033,13 @@ retry:
        switch (be32toh(rp->status)) {
        case LTTNG_VIEWER_INDEX_INACTIVE:
                printf_verbose("get_next_index: inactive\n");
+
+               if (index->ts_cycles.timestamp_end ==
+                               be64toh(rp->timestamp_end)) {
+                       /* Already seen this timestamp. */
+                       (void) poll(NULL, 0, ACTIVE_POLL_DELAY);
+               }
+
                memset(index, 0, sizeof(struct packet_index));
                index->ts_cycles.timestamp_end = be64toh(rp->timestamp_end);
                *stream_id = be64toh(rp->stream_id);
This page took 0.024828 seconds and 4 git commands to generate.