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:
ret = LTTCOMM_UST_CHAN_FAIL;
goto error;
}
+
rcu_read_lock();
hashtable_add_unique(usess->domain_global.channels, &uchan->node);
rcu_read_unlock();
/* Add channel to all registered applications */
ret = ust_app_add_channel_all(usess, uchan);
- if (ret != LTTCOMM_OK) {
+ if (ret != 0) {
goto error;
}
ret = LTTCOMM_FATAL;
goto error;
}
+
}
ret = ust_app_add_event_all(usess, uchan, uevent);
goto error;
}
+ /* Add ltt ust event to channel */
rcu_read_lock();
hashtable_add_unique(uchan->events, &uevent->node);
rcu_read_unlock();
+
+ DBG3("UST ltt event %s added to channel %s", uevent->attr.name,
+ uchan->name);
break;
}
case LTTNG_DOMAIN_UST_EXEC_NAME:
{
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;