Clean-up: Move agent_apps_ht_by_sock definition to main.c
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jul 2015 16:48:52 +0000 (12:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jul 2015 16:55:00 +0000 (12:55 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent.h
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/event.c
src/bin/lttng-sessiond/event.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng-sessiond/trace-ust.h
src/bin/lttng-sessiond/ust-app.h
tests/unit/test_ust_data.c

index d08ad6e220360ab87e6ce68b1bc8e9838e21962b..7faae117ee141cbcb8e99bfa76484fc46d957ed4 100644 (file)
@@ -30,9 +30,9 @@
 
 /*
  * Hash table that contains the agent app created upon registration indexed by
 
 /*
  * Hash table that contains the agent app created upon registration indexed by
- * socket.
+ * socket. Global to the session daemon.
  */
  */
-struct lttng_ht *agent_apps_ht_by_sock;
+extern struct lttng_ht *agent_apps_ht_by_sock;
 
 struct agent_ht_key {
        const char *name;
 
 struct agent_ht_key {
        const char *name;
index a6ce344a483d11642bf751aae9fad1565aa46afd..11e2885411f69f6fb07325d0364aed8c891e37d1 100644 (file)
@@ -38,6 +38,7 @@
 #include "lttng-sessiond.h"
 #include "utils.h"
 #include "syscall.h"
 #include "lttng-sessiond.h"
 #include "utils.h"
 #include "syscall.h"
+#include "agent.h"
 
 #include "cmd.h"
 
 
 #include "cmd.h"
 
index bedaa2e2f4e220e63c6458a1c7947aaa9081b3a3..08c7d4339f009b120683dfb2de44b310cf7dd0cc 100644 (file)
@@ -33,6 +33,7 @@
 #include "ust-app.h"
 #include "trace-kernel.h"
 #include "trace-ust.h"
 #include "ust-app.h"
 #include "trace-kernel.h"
 #include "trace-ust.h"
+#include "agent.h"
 
 /*
  * Add unique UST event based on the event name, filter bytecode and loglevel.
 
 /*
  * Add unique UST event based on the event name, filter bytecode and loglevel.
index cc4a3fa02e0d3f79b5ec52733828aaa35397f0a0..37f98608747b6594c4f72867ceeccc9daf72d767 100644 (file)
 #ifndef _LTT_EVENT_H
 #define _LTT_EVENT_H
 
 #ifndef _LTT_EVENT_H
 #define _LTT_EVENT_H
 
-#include "agent.h"
 #include "trace-kernel.h"
 
 #include "trace-kernel.h"
 
+struct agent;
+
 int event_kernel_disable_event(struct ltt_kernel_channel *kchan,
                char *event_name);
 int event_kernel_disable_event_type(struct ltt_kernel_channel *kchan,
 int event_kernel_disable_event(struct ltt_kernel_channel *kchan,
                char *event_name);
 int event_kernel_disable_event_type(struct ltt_kernel_channel *kchan,
index 2582e886d1e1a5f5352a6f91b8bd82b2ea914c7b..c66548cd87d25495de8d87ebb275d5bea5adc557 100644 (file)
@@ -73,6 +73,7 @@
 #include "save.h"
 #include "load-session-thread.h"
 #include "syscall.h"
 #include "save.h"
 #include "load-session-thread.h"
 #include "syscall.h"
+#include "agent.h"
 
 #define CONSUMERD_FILE "lttng-consumerd"
 
 
 #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;
 
 /* 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
 /*
  * Whether sessiond is ready for commands/health check requests.
  * NR_LTTNG_SESSIOND_READY must match the number of calls to
index 2740d0f803a6d3393a2431dac53e85e85f21e846..248669616a3c4fc048bfb7ac2c47bde401fcbb15 100644 (file)
@@ -30,6 +30,7 @@
 #include "trace-ust.h"
 #include "utils.h"
 #include "ust-app.h"
 #include "trace-ust.h"
 #include "utils.h"
 #include "ust-app.h"
+#include "agent.h"
 
 /*
  * Match function for the events hash table lookup.
 
 /*
  * Match function for the events hash table lookup.
index c4dbe06c56c3dd7f3a5c57bcc754d814286b89c4..a65bd30a954457ca8ba088244f970bb793f3d10e 100644 (file)
 #include <common/defaults.h>
 
 #include "consumer.h"
 #include <common/defaults.h>
 
 #include "consumer.h"
-#include "agent.h"
 #include "ust-ctl.h"
 
 #include "ust-ctl.h"
 
+struct agent;
+
 struct ltt_ust_ht_key {
        const char *name;
        const struct lttng_filter_bytecode *filter;
 struct ltt_ust_ht_key {
        const char *name;
        const struct lttng_filter_bytecode *filter;
index 66cda8c081518024feb120fdbf7b2f33be54ff03..102b05b276bdcbde9b088d46376fc5fc2307ed29 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <common/compat/uuid.h>
 
 
 #include <common/compat/uuid.h>
 
-#include "agent.h"
 #include "trace-ust.h"
 #include "ust-registry.h"
 
 #include "trace-ust.h"
 #include "ust-registry.h"
 
index 6df66acbe6ee9e6d6f1ffe5fc083885e673893f9..d7d2e35398ecf8b73a1de05bb3bb4c49a80f1df4 100644 (file)
@@ -49,6 +49,9 @@ int lttng_opt_mi;
 int ust_consumerd32_fd;
 int ust_consumerd64_fd;
 
 int ust_consumerd32_fd;
 int ust_consumerd64_fd;
 
+/* Global variable required by sessiond objects being linked-in */
+struct lttng_ht *agent_apps_ht_by_sock;
+
 static const char alphanum[] =
        "0123456789"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 static const char alphanum[] =
        "0123456789"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
This page took 0.031916 seconds and 4 git commands to generate.