Fix: sessiond: null pointer dereference on initial evaluation of session
[lttng-tools.git] / src / bin / lttng-sessiond / stream-class.cpp
CommitLineData
0220be14
JG
1/*
2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#include "stream-class.hpp"
9#include "trace-class.hpp"
10
11namespace lst = lttng::sessiond::trace;
12
13lttng::sessiond::trace::stream_class::stream_class(
14 unsigned int in_id, enum header_type in_header_type) :
65cd3c0c 15 id{in_id}, header_type_{in_header_type}
0220be14
JG
16{
17}
18
19void lst::stream_class::accept(trace_class_visitor& visitor) const
20{
21 visitor.visit(*this);
22 _accept_on_event_classes(visitor);
23}
24
25const lttng::sessiond::trace::type& lst::stream_class::get_context() const
26{
27 LTTNG_ASSERT(_context);
28 return *_context;
29}
This page took 0.024415 seconds and 4 git commands to generate.