goto error;
}
+ /*
+ * Add channel(s) and event(s) to newly registered apps
+ * from lttng global UST domain.
+ */
+ update_ust_app(ust_cmd.sock);
+
ret = ustctl_register_done(ust_cmd.sock);
if (ret < 0) {
/*
ust_cmd.sock);
}
- /*
- * Add channel(s) and event(s) to newly registered apps
- * from lttng global UST domain.
- */
- update_ust_app(ust_cmd.sock);
break;
}
} else {
goto error;
}
- /* Socket closed */
+ /* Socket closed on remote end. */
ust_app_unregister(pollfd);
break;
}
int ret;
struct ltt_ust_session *usess = session->ust_session;
- DBG("Enabling channel %s for session %s", session->name, attr->name);
+ DBG("Enabling channel %s for session %s", attr->name, session->name);
switch (domain->type) {
case LTTNG_DOMAIN_KERNEL:
/* Add channel to all registered applications */
ret = ust_app_add_channel_all(usess, uchan);
- if (ret != LTTCOMM_OK) {
+ if (ret != 0) {
goto error;
}
{
int ret;
struct ltt_kernel_session *ksession;
- struct ltt_ust_session *usess = session->ust_session;
+ struct ltt_ust_session *usess;
/* Short cut */
ksession = session->kernel_session;
+ usess = session->ust_session;
/* Kernel tracing */
if (ksession != NULL) {
}
/* Flag session that trace should start automatically */
- usess->start_trace = 1;
+ if (usess) {
+ usess->start_trace = 1;
- ret = ust_app_start_trace_all(usess);
- if (ret < 0) {
- ret = LTTCOMM_UST_START_FAIL;
- goto error;
+ ret = ust_app_start_trace_all(usess);
+ if (ret < 0) {
+ ret = LTTCOMM_UST_START_FAIL;
+ goto error;
+ }
}
ret = LTTCOMM_OK;