Cleanup lttng-live: 80 columns wrapping
[babeltrace.git] / formats / lttng-live / lttng-live-comm.c
index 76dc6bbb14bc2ea6a045cd2ddb8072365fb9416c..cd4217f187909ebbb7d6500b05673d01785d2d96 100644 (file)
@@ -676,14 +676,18 @@ retry:
                        ret = append_metadata(ctx, stream);
                        if (ret)
                                goto error;
-                       goto retry;
                }
                if (rp.flags & LTTNG_VIEWER_FLAG_NEW_STREAM) {
+                       printf_verbose("get_data_packet: new streams needed\n");
                        ret = ask_new_streams(ctx);
                        if (ret < 0)
                                goto error;
-                       g_hash_table_foreach(ctx->session->ctf_traces, add_traces,
-                                       ctx->bt_ctx);
+                       g_hash_table_foreach(ctx->session->ctf_traces,
+                                       add_traces, ctx->bt_ctx);
+               }
+               if (rp.flags & (LTTNG_VIEWER_FLAG_NEW_METADATA
+                               | LTTNG_VIEWER_FLAG_NEW_STREAM)) {
+                       goto retry;
                }
                fprintf(stderr, "[error] get_data_packet: error\n");
                ret = -1;
@@ -745,7 +749,7 @@ retry:
                goto error;
        }
        assert(ret_len == len);
-
+       ret = 0;
 end:
 error:
        return ret;
@@ -991,8 +995,8 @@ retry:
                        ret = ask_new_streams(ctx);
                        if (ret < 0)
                                goto error;
-                       g_hash_table_foreach(ctx->session->ctf_traces, add_traces,
-                                       ctx->bt_ctx);
+                       g_hash_table_foreach(ctx->session->ctf_traces,
+                                       add_traces, ctx->bt_ctx);
                }
                break;
        case LTTNG_VIEWER_INDEX_RETRY:
This page took 0.023898 seconds and 4 git commands to generate.