projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: unbalanced health register/unregister on error
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
agent.c
diff --git
a/src/bin/lttng-sessiond/agent.c
b/src/bin/lttng-sessiond/agent.c
index 8e1ef0849fb13b4efb6c27e0e92c68d3fe71784d..9ea899f57f7fb386c12713ef25b2e3f8ca6bd972 100644
(file)
--- 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 "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)
#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 */
}
/* 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;
}
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:
return 1;
no_match:
@@
-701,7
+708,7
@@
void destroy_app_ctx(struct agent_app_ctx *ctx)
}
static
}
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;
{
struct agent_app_ctx *agent_ctx = NULL;
@@
-731,7
+738,7
@@
end:
*
* Return LTTNG_OK on success or else a LTTNG_ERR* code.
*/
*
* 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;
enum lttng_domain_type domain)
{
int ret;
@@
-1159,7
+1166,7
@@
void agent_add_event(struct agent_event *event, struct agent *agt)
/*
* Unique add of a agent context to an agent object.
*/
/*
* 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;
{
int ret = LTTNG_OK;
struct agent_app_ctx *agent_ctx = NULL;
This page took
0.028032 seconds
and
5
git commands to generate.