X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmanage-apps.cpp;h=ef55b452e8b54b63a37366fcd25a5a8d39089a4a;hb=75f62e5383c6ea1f62fb488a94f4a8f98400db71;hp=8e7f50900bc32bbdf66816f132d89ebad775ff82;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/manage-apps.cpp b/src/bin/lttng-sessiond/manage-apps.cpp index 8e7f50900..ef55b452e 100644 --- a/src/bin/lttng-sessiond/manage-apps.cpp +++ b/src/bin/lttng-sessiond/manage-apps.cpp @@ -13,6 +13,8 @@ #include "thread.hpp" #include "utils.hpp" +#include + namespace { struct thread_notifiers { struct lttng_pipe *quit_pipe; @@ -35,7 +37,7 @@ static void cleanup_application_management_thread(void *data) * * At that point, it flushes the data (tracing and metadata) associated * with this application and tears down ust app sessions and other - * associated data structures through ust_app_unregister(). + * associated data structures through ust_app_unregister_by_socket(). * * Note that this thread never sends commands to the applications * through the command sockets; it merely listens for hang-ups @@ -84,7 +86,7 @@ static void *thread_application_management(void *data) health_code_update(); - while (1) { + while (true) { DBG("Apps thread polling"); /* Inifinite blocking call, waiting for transmission */ @@ -165,7 +167,7 @@ static void *thread_application_management(void *data) } /* Socket closed on remote end. */ - ust_app_unregister(pollfd); + ust_app_unregister_by_socket(pollfd); } else { ERR("Unexpected poll events %u for sock %d", revents, @@ -198,7 +200,7 @@ error_testpoint: DBG("Application communication apps thread cleanup complete"); rcu_thread_offline(); rcu_unregister_thread(); - return NULL; + return nullptr; } static bool shutdown_application_management_thread(void *data) @@ -212,7 +214,7 @@ static bool shutdown_application_management_thread(void *data) bool launch_application_management_thread(int apps_cmd_pipe_read_fd) { struct lttng_pipe *quit_pipe; - struct thread_notifiers *notifiers = NULL; + struct thread_notifiers *notifiers = nullptr; struct lttng_thread *thread; notifiers = zmalloc();