Log error code's value when sessiond replies to a client
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 2582e886d1e1a5f5352a6f91b8bd82b2ea914c7b..fa5cb901e12505c2d71d6156fdd81f5701dec2e9 100644 (file)
@@ -73,6 +73,7 @@
 #include "save.h"
 #include "load-session-thread.h"
 #include "syscall.h"
+#include "agent.h"
 
 #define CONSUMERD_FILE "lttng-consumerd"
 
@@ -305,6 +306,9 @@ const char * const config_section_name = "sessiond";
 /* Load session thread information to operate. */
 struct load_session_thread_data *load_info;
 
+/* Global hash tables */
+struct lttng_ht *agent_apps_ht_by_sock = NULL;
+
 /*
  * Whether sessiond is ready for commands/health check requests.
  * NR_LTTNG_SESSIOND_READY must match the number of calls to
@@ -4329,9 +4333,10 @@ static void *thread_manage_clients(void *data)
 
                health_code_update();
 
-               DBG("Sending response (size: %d, retcode: %s)",
+               DBG("Sending response (size: %d, retcode: %s (%d))",
                                cmd_ctx->lttng_msg_size,
-                               lttng_strerror(-cmd_ctx->llm->ret_code));
+                               lttng_strerror(-cmd_ctx->llm->ret_code),
+                               cmd_ctx->llm->ret_code);
                ret = send_unix_sock(sock, cmd_ctx->llm, cmd_ctx->lttng_msg_size);
                if (ret < 0) {
                        ERR("Failed to send data back to client");
@@ -5298,9 +5303,6 @@ int main(int argc, char **argv)
        void *status;
        const char *home_path, *env_app_timeout;
 
-       /* Initialize agent apps ht global variable */
-       agent_apps_ht_by_sock = NULL;
-
        init_kernel_workarounds();
 
        rcu_register_thread();
This page took 0.024935 seconds and 5 git commands to generate.