X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent-thread.cpp;h=c8fab6164f0c68b05b9545aab7abe25bbb192749;hb=139a8d250fb18f8ffc95b0936f7285f7b484b72f;hp=5e158b49bea408d2c161121f90eed7fbe4294359;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/agent-thread.cpp b/src/bin/lttng-sessiond/agent-thread.cpp index 5e158b49b..c8fab6164 100644 --- a/src/bin/lttng-sessiond/agent-thread.cpp +++ b/src/bin/lttng-sessiond/agent-thread.cpp @@ -7,21 +7,22 @@ #define _LGPL_SOURCE -#include -#include -#include -#include - -#include - -#include "fd-limit.h" -#include "agent-thread.h" -#include "agent.h" -#include "lttng-sessiond.h" -#include "session.h" -#include "utils.h" -#include "thread.h" - +#include +#include +#include +#include + +#include + +#include "fd-limit.hpp" +#include "agent-thread.hpp" +#include "agent.hpp" +#include "lttng-sessiond.hpp" +#include "session.hpp" +#include "utils.hpp" +#include "thread.hpp" + +namespace { struct thread_notifiers { struct lttng_pipe *quit_pipe; sem_t ready; @@ -36,15 +37,15 @@ struct agent_protocol_version { unsigned int major, minor; }; -static int agent_tracing_enabled = -1; +int agent_tracing_enabled = -1; /* * Note that there is not port here. It's set after this URI is parsed so we * can let the user define a custom one. However, localhost is ALWAYS the * default listening address. */ -static const char *default_reg_uri = - "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS; +const char *default_reg_uri = "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS; +} /* namespace */ /* * Update agent application using the given socket. This is done just after @@ -570,7 +571,7 @@ bool launch_agent_management_thread(void) struct thread_notifiers *notifiers; struct lttng_thread *thread; - notifiers = (thread_notifiers *) zmalloc(sizeof(*notifiers)); + notifiers = zmalloc(); if (!notifiers) { goto error_alloc; }