X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=310a7e8e1f7513dba73bd9d8d6a07ed16998eead;hp=8e1ef0849fb13b4efb6c27e0e92c68d3fe71784d;hb=87597c2c3bbaa1502ad2025cbf16704829f3b464;hpb=0a85e7a38cb71bee129af0d2c6fe9de1306ea80c diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 8e1ef0849..310a7e8e1 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -29,7 +29,7 @@ #include "agent.h" #include "ust-app.h" #include "utils.h" -#include "error.h" +#include "common/error.h" #define AGENT_RET_CODE_INDEX(code) (code - AGENT_RET_CODE_SUCCESS) @@ -143,11 +143,18 @@ static int ht_match_event(struct cds_lfht_node *node, } /* Filter expression */ - if (strncmp(event->filter_expression, key->filter_expression, - strlen(event->filter_expression)) != 0) { + if (!!event->filter_expression ^ !!key->filter_expression) { + /* One has a filter expression, the other does not */ goto no_match; } + if (event->filter_expression) { + if (strncmp(event->filter_expression, key->filter_expression, + strlen(event->filter_expression)) != 0) { + goto no_match; + } + } + return 1; no_match: