From: Jérémie Galarneau Date: Wed, 21 Apr 2021 04:41:09 +0000 (-0400) Subject: Fix: sessiond: triggers: failure to insert trigger is fatal X-Git-Tag: v2.13.0-rc1~26 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=75e540c60661f7e384e35289fd13a72bc4e015e7;p=lttng-tools.git Fix: sessiond: triggers: failure to insert trigger is fatal Inserting a trigger by name/owner should succeed if it could be added to the top-level triggers_ht. Signed-off-by: Jérémie Galarneau Change-Id: I46518b86b34cb13074723b4f2bef38026d898700 --- diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index f13e22a17..c9c21bc72 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -2729,9 +2729,8 @@ int handle_notification_thread_command_register_trigger( trigger, &trigger_ht_element->node_by_name_uid); if (node != &trigger_ht_element->node_by_name_uid) { - /* Not a fatal error, simply report it to the client. */ - cds_lfht_del(state->triggers_ht, &trigger_ht_element->node); - *cmd_result = LTTNG_ERR_TRIGGER_EXISTS; + /* Internal error: add to triggers_ht should have failed. */ + ret = -1; goto error_free_ht_element; }