summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-01-16 14:18:14 -0600
committerFabiano FidĂȘncio <fidencio@redhat.com>2015-02-23 23:00:42 +0100
commite0fa0d5ae2e6cc4b5a10a26c8f20c6bdb5c1f4ef (patch)
tree28dad0df44c1d44b94a5b6c2dfd2818d6087ec67
parent196a3c3d9a2e5ef15c518f7d5a97d63d80f8942f (diff)
downloadspice-e0fa0d5ae2e6cc4b5a10a26c8f20c6bdb5c1f4ef.tar.gz
spice-e0fa0d5ae2e6cc4b5a10a26c8f20c6bdb5c1f4ef.tar.xz
spice-e0fa0d5ae2e6cc4b5a10a26c8f20c6bdb5c1f4ef.zip
Make global 'reds' extern
This allows it to be accessed from other files. This is a temporary step toward getting rid of the global-ness of this variable, and it allows us to update the function signature bit-by-bit.
-rw-r--r--server/reds-private.h4
-rw-r--r--server/reds.c2
-rw-r--r--server/reds.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/server/reds-private.h b/server/reds-private.h
index 953a52aa..2a8f980f 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -120,7 +120,7 @@ typedef struct RedsClientMonitorsConfig {
int buffer_pos;
} RedsClientMonitorsConfig;
-typedef struct RedsState {
+struct RedsState {
int listen_socket;
int secure_listen_socket;
SpiceWatch *listen_watch;
@@ -173,6 +173,6 @@ typedef struct RedsState {
RedsClientMonitorsConfig client_monitors_config;
int mm_time_enabled;
uint32_t mm_time_latency;
-} RedsState;
+};
#endif
diff --git a/server/reds.c b/server/reds.c
index 208a3673..49b7b00c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -119,7 +119,7 @@ int agent_copypaste = TRUE;
int agent_file_xfer = TRUE;
static bool exit_on_disconnect = FALSE;
-static RedsState *reds = NULL;
+RedsState *reds = NULL;
typedef struct RedLinkInfo {
RedsStream *stream;
diff --git a/server/reds.h b/server/reds.h
index e8b3c4e8..31d6ec70 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -32,6 +32,8 @@
#define SPICE_GNUC_VISIBLE __attribute__ ((visibility ("default")))
+typedef struct RedsState RedsState;
+extern RedsState *reds;
struct QXLState {
QXLInterface *qif;