X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbin%2Flttng-sessiond%2Faction-executor.cpp;h=0b910d474ca3c01c0ee01c245d0c4c25c52b8a85;hb=2d7da3031c65c4569ff2428a7c2cad30007f3b50;hp=e2eeed45115cfb36583a9615fa9bd3ba767ce187;hpb=f46376a14da2eb796690cb4e718e8b213839d6ea;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/action-executor.cpp b/src/bin/lttng-sessiond/action-executor.cpp index e2eeed451..0b910d474 100644 --- a/src/bin/lttng-sessiond/action-executor.cpp +++ b/src/bin/lttng-sessiond/action-executor.cpp @@ -5,29 +5,29 @@ * */ -#include "action-executor.h" -#include "cmd.h" -#include "health-sessiond.h" -#include "lttng-sessiond.h" -#include "notification-thread-internal.h" -#include "session.h" -#include "thread.h" -#include -#include -#include -#include -#include +#include "action-executor.hpp" +#include "cmd.hpp" +#include "health-sessiond.hpp" +#include "lttng-sessiond.hpp" +#include "notification-thread-internal.hpp" +#include "session.hpp" +#include "thread.hpp" +#include +#include +#include +#include +#include #include -#include +#include #include #include #include #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -233,6 +233,15 @@ static int client_handle_transmission_status( case CLIENT_TRANSMISSION_STATUS_COMPLETE: DBG("Successfully sent full notification to client, client_id = %" PRIu64, client->id); + /* + * There is no need to wake the (e)poll thread. If it was waiting for + * "out" events on the client's socket, it will see that no payload + * in queued and will unsubscribe from that event. + * + * In the other cases, we have to wake the the (e)poll thread to either + * handle the error on the client or to get it to monitor the client "out" + * events. + */ update_communication = false; break; case CLIENT_TRANSMISSION_STATUS_QUEUED: @@ -821,7 +830,7 @@ static void clean_up_action_executor_thread(void *_data) struct action_executor *action_executor_create( struct notification_thread_handle *handle) { - struct action_executor *executor = (action_executor *) zmalloc(sizeof(*executor)); + struct action_executor *executor = zmalloc(); if (!executor) { goto end; @@ -893,7 +902,7 @@ enum action_executor_status action_executor_enqueue_trigger( goto error_unlock; } - work_item = (action_work_item *) zmalloc(sizeof(*work_item)); + work_item = zmalloc(); if (!work_item) { PERROR("Failed to allocate action executor work item: trigger name = `%s`", get_trigger_name(trigger));