Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-relayd / viewer-session.cpp
index 9bed097ab8cbbbaa7f23a6a04046f0c95a1e37fd..194073f598783e011cf8b852515e34dba05950a3 100644 (file)
@@ -8,21 +8,21 @@
  */
 
 #define _LGPL_SOURCE
-#include <common/common.h>
+#include <common/common.hpp>
 #include <urcu/rculist.h>
 
-#include "lttng-relayd.h"
-#include "ctf-trace.h"
-#include "session.h"
-#include "viewer-session.h"
-#include "viewer-stream.h"
-#include "stream.h"
+#include "lttng-relayd.hpp"
+#include "ctf-trace.hpp"
+#include "session.hpp"
+#include "viewer-session.hpp"
+#include "viewer-stream.hpp"
+#include "stream.hpp"
 
 struct relay_viewer_session *viewer_session_create(void)
 {
        struct relay_viewer_session *vsession;
 
-       vsession = (relay_viewer_session *) zmalloc(sizeof(*vsession));
+       vsession = zmalloc<relay_viewer_session>();
        if (!vsession) {
                goto end;
        }
@@ -77,7 +77,6 @@ enum lttng_viewer_attach_return_code viewer_session_attach(
        } else {
                int ret;
 
-               LTTNG_ASSERT(!vsession->current_trace_chunk);
                session->viewer_attached = true;
 
                ret = viewer_session_set_trace_chunk_copy(vsession,
This page took 0.023999 seconds and 4 git commands to generate.