#include "utils.h"
#include "manage-consumer.h"
#include "clear.h"
+#include "agent-thread.h"
static bool is_root;
bool need_domain;
bool need_consumerd;
- DBG("Processing client command %d", cmd_ctx->lsm.cmd_type);
+ DBG("Processing client command '%s\' (%d)",
+ lttcomm_sessiond_command_str(cmd_ctx->lsm.cmd_type),
+ cmd_ctx->lsm.cmd_type);
assert(!rcu_read_ongoing());
case LTTNG_DOMAIN_JUL:
case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_PYTHON:
+ if (!agent_tracing_is_enabled()) {
+ ret = LTTNG_ERR_AGENT_TRACING_DISABLED;
+ goto error;
+ }
+ /* Fallthrough */
case LTTNG_DOMAIN_UST:
{
if (!ust_app_supported()) {
continue;
}
+ if (ret < LTTNG_OK || ret >= LTTNG_ERR_NR) {
+ WARN("Command returned an invalid status code, returning unknown error: command type = %d, ret = %d", cmd_ctx.lsm.cmd_type, ret);
+ ret = LTTNG_ERR_UNK;
+ }
+
cmd_completion_handler = cmd_pop_completion_handler();
if (cmd_completion_handler) {
enum lttng_error_code completion_code;