projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Move initialization of queue_pipe_fd after null check of handle
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
context.c
diff --git
a/src/bin/lttng-sessiond/context.c
b/src/bin/lttng-sessiond/context.c
index 6cf301dcd04488b1a9f02ce79584e5cf0c445dea..8a43cb7c14e9ab5f336f867d8f88df6e7a71cf11 100644
(file)
--- a/
src/bin/lttng-sessiond/context.c
+++ b/
src/bin/lttng-sessiond/context.c
@@
-107,7
+107,8
@@
error:
*/
static int add_uctx_to_channel(struct ltt_ust_session *usess,
enum lttng_domain_type domain,
*/
static int add_uctx_to_channel(struct ltt_ust_session *usess,
enum lttng_domain_type domain,
- struct ltt_ust_channel *uchan, struct lttng_event_context *ctx)
+ struct ltt_ust_channel *uchan,
+ const struct lttng_event_context *ctx)
{
int ret;
struct ltt_ust_context *uctx = NULL;
{
int ret;
struct ltt_ust_context *uctx = NULL;
@@
-169,18
+170,19
@@
static int add_uctx_to_channel(struct ltt_ust_session *usess,
goto error;
}
goto error;
}
- ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
- if (ret < 0) {
- goto error;
- }
-
- rcu_read_lock();
-
/* Add ltt UST context node to ltt UST channel */
lttng_ht_add_ulong(uchan->ctx, &uctx->node);
/* Add ltt UST context node to ltt UST channel */
lttng_ht_add_ulong(uchan->ctx, &uctx->node);
- rcu_read_unlock();
cds_list_add_tail(&uctx->list, &uchan->ctx_list);
cds_list_add_tail(&uctx->list, &uchan->ctx_list);
+ if (!usess->active) {
+ goto end;
+ }
+
+ ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
+ if (ret < 0) {
+ goto error;
+ }
+end:
DBG("Context UST %d added to channel %s", uctx->ctx.ctx, uchan->name);
return 0;
DBG("Context UST %d added to channel %s", uctx->ctx.ctx, uchan->name);
return 0;
@@
-195,7
+197,7
@@
duplicate:
* Add kernel context to tracer.
*/
int context_kernel_add(struct ltt_kernel_session *ksession,
* Add kernel context to tracer.
*/
int context_kernel_add(struct ltt_kernel_session *ksession,
- struct lttng_event_context *ctx, char *channel_name)
+
const
struct lttng_event_context *ctx, char *channel_name)
{
int ret;
struct ltt_kernel_channel *kchan;
{
int ret;
struct ltt_kernel_channel *kchan;
@@
-312,7
+314,8
@@
error:
* Add UST context to tracer.
*/
int context_ust_add(struct ltt_ust_session *usess,
* Add UST context to tracer.
*/
int context_ust_add(struct ltt_ust_session *usess,
- enum lttng_domain_type domain, struct lttng_event_context *ctx,
+ enum lttng_domain_type domain,
+ const struct lttng_event_context *ctx,
char *channel_name)
{
int ret = LTTNG_OK;
char *channel_name)
{
int ret = LTTNG_OK;
This page took
0.026553 seconds
and
5
git commands to generate.