#include "kernel-consumer.h"
#include "lttng-sessiond.h"
#include "utils.h"
-#include "syscall.h"
+#include "lttng-syscall.h"
#include "agent.h"
#include "buffer-registry.h"
#include "notification-thread.h"
#include "rotate.h"
#include "rotation-thread.h"
#include "sessiond-timer.h"
+#include "agent-thread.h"
#include "cmd.h"
break;
}
case LTTNG_DOMAIN_UST:
+ break;
case LTTNG_DOMAIN_JUL:
case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_PYTHON:
+ if (!agent_tracing_is_enabled()) {
+ DBG("Attempted to enable a channel in an agent domain but the agent thread is not running");
+ ret = LTTNG_ERR_AGENT_TRACING_DISABLED;
+ goto error;
+ }
break;
default:
ret = LTTNG_ERR_UNKNOWN_DOMAIN;
assert(usess);
+ if (!agent_tracing_is_enabled()) {
+ DBG("Attempted to enable an event in an agent domain but the agent thread is not running");
+ ret = LTTNG_ERR_AGENT_TRACING_DISABLED;
+ goto error;
+ }
+
agt = trace_ust_find_agent(usess, domain->type);
if (!agt) {
agt = agent_create(domain->type);
current_tracing_path_reply_len =
sizeof(info_return->location.local.absolute_path);
info_return->location_type =
- (uint8_t) LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_LOCAL;
+ (int8_t) LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_LOCAL;
break;
case CONSUMER_DST_NET:
current_tracing_path_reply =
sizeof(info_return->location.relay.relative_path);
/* Currently the only supported relay protocol. */
info_return->location.relay.protocol =
- (uint8_t) LTTNG_TRACE_ARCHIVE_LOCATION_RELAY_PROTOCOL_TYPE_TCP;
+ (int8_t) LTTNG_TRACE_ARCHIVE_LOCATION_RELAY_PROTOCOL_TYPE_TCP;
ret = lttng_strncpy(info_return->location.relay.host,
session_get_net_consumer_hostname(session),
&info_return->location.relay.ports.control,
&info_return->location.relay.ports.data);
info_return->location_type =
- (uint8_t) LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_RELAY;
+ (int8_t) LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_RELAY;
break;
default:
abort();