projects
/
deliverable
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: name of send_sessiond_channel() is misleading
[deliverable/lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.c
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index 4c5160764aac0612992610b985db805fd589e7ca..2e2ae6006023c13b8457b30071e1332fdf24ef14 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-47,7
+47,7
@@
#include "kernel-consumer.h"
#include "lttng-sessiond.h"
#include "utils.h"
#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 "agent.h"
#include "buffer-registry.h"
#include "notification-thread.h"
@@
-55,6
+55,7
@@
#include "rotate.h"
#include "rotation-thread.h"
#include "sessiond-timer.h"
#include "rotate.h"
#include "rotation-thread.h"
#include "sessiond-timer.h"
+#include "agent-thread.h"
#include "cmd.h"
#include "cmd.h"
@@
-1384,9
+1385,15
@@
int cmd_enable_channel(struct ltt_session *session,
break;
}
case LTTNG_DOMAIN_UST:
break;
}
case LTTNG_DOMAIN_UST:
+ break;
case LTTNG_DOMAIN_JUL:
case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_PYTHON:
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;
break;
default:
ret = LTTNG_ERR_UNKNOWN_DOMAIN;
@@
-2094,6
+2101,12
@@
static int _cmd_enable_event(struct ltt_session *session,
assert(usess);
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);
agt = trace_ust_find_agent(usess, domain->type);
if (!agt) {
agt = agent_create(domain->type);
This page took
0.025558 seconds
and
5
git commands to generate.