ctf: allocate some structures with new
[babeltrace.git] / src / plugins / ctf / lttng-live / viewer-connection.hpp
index 2943e1099c1d73c0e31e1f6e78628a17b2ad57f4..4e17d506ca538173d685a7d444fae157d0c1f438 100644 (file)
@@ -7,15 +7,11 @@
 #ifndef LTTNG_LIVE_VIEWER_CONNECTION_H
 #define LTTNG_LIVE_VIEWER_CONNECTION_H
 
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-
 #include <glib.h>
+#include <stdint.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
 #include "compat/socket.h"
 
 #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
@@ -48,29 +44,27 @@ enum lttng_live_get_one_metadata_status
     LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED = -3,
 };
 
-struct lttng_live_component;
-
 struct live_viewer_connection
 {
-    bt_logging_level log_level;
-    bt_self_component *self_comp;
-    bt_self_component_class *self_comp_class;
+    bt_logging_level log_level = (bt_logging_level) 0;
+    bt_self_component *self_comp = nullptr;
+    bt_self_component_class *self_comp_class = nullptr;
 
-    GString *url;
+    GString *url = nullptr;
 
-    GString *relay_hostname;
-    GString *target_hostname;
-    GString *session_name;
-    GString *proto;
+    GString *relay_hostname = nullptr;
+    GString *target_hostname = nullptr;
+    GString *session_name = nullptr;
+    GString *proto = nullptr;
 
-    BT_SOCKET control_sock;
-    int port;
+    BT_SOCKET control_sock {};
+    int port = 0;
 
-    int32_t major;
-    int32_t minor;
+    int32_t major = 0;
+    int32_t minor = 0;
 
-    bool in_query;
-    struct lttng_live_msg_iter *lttng_live_msg_iter;
+    bool in_query = false;
+    struct lttng_live_msg_iter *lttng_live_msg_iter = nullptr;
 };
 
 struct packet_index_time
This page took 0.038659 seconds and 4 git commands to generate.