ret = ustctl_create_channel(app->key.sock, ua_sess->handle,
(struct lttng_ust_channel_attr *)&ua_chan->attr, &ua_chan->obj);
if (ret < 0) {
- DBG("Error creating channel %s for app (pid: %d, sock: %d) "
+ ERR("Creating channel %s for app (pid: %d, sock: %d) "
"and session handle %d with ret %d",
ua_chan->name, app->key.pid, app->key.sock,
ua_sess->handle, ret);
struct ust_app *app, struct lttng_ht_iter *iter)
{
/* Get right UST app session from app */
- lttng_ht_lookup(app->sessions, (void *)((unsigned long) usess->uid), iter);
+ lttng_ht_lookup(app->sessions, (void *)((unsigned long) usess->id), iter);
}
/*
ua_sess->handle = ret;
/* Add ust app session to app's HT */
- lttng_ht_node_init_ulong(&ua_sess->node, (unsigned long) ua_sess->uid);
+ lttng_ht_node_init_ulong(&ua_sess->node, (unsigned long) ua_sess->id);
lttng_ht_add_unique_ulong(app->sessions, &ua_sess->node);
DBG2("UST app session created successfully with handle %d", ret);
goto error;
}
shadow_copy_channel(ua_chan, uchan);
-
- lttng_ht_add_unique_str(ua_sess->channels, &ua_chan->node);
} else {
ua_chan = caa_container_of(ua_chan_node, struct ust_app_channel, node);
}
goto error;
}
+ lttng_ht_add_unique_str(ua_sess->channels, &ua_chan->node);
+
return ua_chan;
error:
DBG("PID %d unregistering with sock %d", lta->key.pid, sock);
+ /* Remove application from socket hash table */
+ lttng_ht_lookup(ust_app_sock_key_map, (void *)((unsigned long) sock), &iter);
+ ret = lttng_ht_del(ust_app_sock_key_map, &iter);
+ assert(!ret);
+
/* Get the node reference for a call_rcu */
lttng_ht_lookup(ust_app_ht, (void *)((unsigned long) lta->key.pid), &iter);
node = lttng_ht_iter_get_node_ulong(&iter);
goto error;
}
+ /* Remove application from PID hash table */
ret = lttng_ht_del(ust_app_ht, &iter);
assert(!ret);
call_rcu(&node->head, delete_ust_app_rcu);