X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Faction-executor.c;h=2a0aab45c962db46f9e9f499a7bdaca3420bd98a;hb=5e2abfaf5887f5af81f2b9da7fd18ea07c21366c;hp=4f027fdb91b3e3b30ab8859a05fbf319739cefa7;hpb=34f87583034e1aa9d65ce5d35b09bd5e8cfba875;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/action-executor.c b/src/bin/lttng-sessiond/action-executor.c index 4f027fdb9..2a0aab45c 100644 --- a/src/bin/lttng-sessiond/action-executor.c +++ b/src/bin/lttng-sessiond/action-executor.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -198,7 +199,9 @@ static int action_executor_notify_handler(struct action_executor *executor, lttng_trigger_get_const_condition(work_item->trigger), work_item->evaluation, lttng_trigger_get_credentials(work_item->trigger), - LTTNG_OPTIONAL_GET_PTR(work_item->object_creds), + work_item->object_creds.is_set ? + &(work_item->object_creds.value) : + NULL, client_handle_transmission_status, executor); } @@ -598,8 +601,10 @@ static bool shutdown_action_executor_thread(void *_data) { struct action_executor *executor = _data; + pthread_mutex_lock(&executor->work.lock); executor->should_quit = true; pthread_cond_signal(&executor->work.cond); + pthread_mutex_unlock(&executor->work.lock); return true; } @@ -723,10 +728,10 @@ enum action_executor_status action_executor_enqueue( signal = true; error_unlock: - pthread_mutex_unlock(&executor->work.lock); if (signal) { pthread_cond_signal(&executor->work.cond); } + pthread_mutex_unlock(&executor->work.lock); lttng_evaluation_destroy(evaluation); return executor_status;