enum lttng_error_code *_cmd_result)
{
int ret = 0;
+ bool found = false;
enum lttng_error_code cmd_result = LTTNG_OK;
struct notification_event_tracer_event_source_element *source_element = NULL, *tmp;
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cds_list_del(&source_element->node);
+ found = true;
break;
}
- /* It should always be found. */
- assert(source_element);
+ if (!found) {
+ /*
+ * This is temporarily allowed since the poll activity set is
+ * not properly cleaned-up for the moment. This is adressed in
+ * an upcoming fix.
+ */
+ source_element = NULL;
+ goto end;
+ }
if (!source_element->is_fd_in_poll_set) {
/* Skip the poll set removal. */
static
int handle_notification_thread_command_unregister_trigger(
struct notification_thread_state *state,
- struct lttng_trigger *trigger,
+ const struct lttng_trigger *trigger,
enum lttng_error_code *_cmd_reply)
{
struct cds_lfht_iter iter;
struct lttng_channel_trigger_list *trigger_list;
struct notification_client_list *client_list;
struct lttng_trigger_ht_element *trigger_ht_element = NULL;
- struct lttng_condition *condition = lttng_trigger_get_condition(
+ const struct lttng_condition *condition = lttng_trigger_get_const_condition(
trigger);
enum lttng_error_code cmd_reply;
switch (cmd->type) {
case NOTIFICATION_COMMAND_TYPE_REGISTER_TRIGGER:
DBG("[notification-thread] Received register trigger command");
- ret = handle_notification_thread_command_register_trigger(
- state, cmd->parameters.trigger,
+ ret = handle_notification_thread_command_register_trigger(state,
+ cmd->parameters.register_trigger.trigger,
&cmd->reply_code);
break;
case NOTIFICATION_COMMAND_TYPE_UNREGISTER_TRIGGER:
DBG("[notification-thread] Received unregister trigger command");
ret = handle_notification_thread_command_unregister_trigger(
- state, cmd->parameters.trigger,
+ state,
+ cmd->parameters.unregister_trigger.trigger,
&cmd->reply_code);
break;
case NOTIFICATION_COMMAND_TYPE_ADD_CHANNEL: