X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=3cb33caef4835df1fb5d0681c9d036b0fd10eb4d;hp=310a7e8e1f7513dba73bd9d8d6a07ed16998eead;hb=46440d0ccf65b098757389ffebb0f7452626c4a3;hpb=6712db617fe9155ea236f6840c2bd18dbec4c871 diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 310a7e8e1..3cb33caef 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -143,7 +143,7 @@ static int ht_match_event(struct cds_lfht_node *node, } /* Filter expression */ - if (!!event->filter_expression ^ !!key->filter_expression) { + if (!!event->filter_expression != !!key->filter_expression) { /* One has a filter expression, the other does not */ goto no_match; } @@ -708,7 +708,7 @@ void destroy_app_ctx(struct agent_app_ctx *ctx) } static -struct agent_app_ctx *create_app_ctx(struct lttng_event_context *ctx) +struct agent_app_ctx *create_app_ctx(const struct lttng_event_context *ctx) { struct agent_app_ctx *agent_ctx = NULL; @@ -738,7 +738,7 @@ end: * * Return LTTNG_OK on success or else a LTTNG_ERR* code. */ -int agent_enable_context(struct lttng_event_context *ctx, +int agent_enable_context(const struct lttng_event_context *ctx, enum lttng_domain_type domain) { int ret; @@ -830,7 +830,8 @@ end: * * Return LTTNG_OK on success or else a LTTNG_ERR* code. */ -int disable_context(struct agent_app_ctx *ctx, enum lttng_domain_type domain) +static int disable_context(struct agent_app_ctx *ctx, + enum lttng_domain_type domain) { int ret = LTTNG_OK; struct agent_app *app; @@ -1166,7 +1167,7 @@ void agent_add_event(struct agent_event *event, struct agent *agt) /* * Unique add of a agent context to an agent object. */ -int agent_add_context(struct lttng_event_context *ctx, struct agent *agt) +int agent_add_context(const struct lttng_event_context *ctx, struct agent *agt) { int ret = LTTNG_OK; struct agent_app_ctx *agent_ctx = NULL;