summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-05 11:17:15 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-07-05 13:39:35 +0200
commitcf93f0e0a65d66ed57f24efb7fbd96dc455b3732 (patch)
tree99f47f909ed19410faba1fa1ae0fa68e6af77d3c
parent0bf9d146e8da6d34e21fa16a0aacd15748d6cbc9 (diff)
downloadopenvpn-cf93f0e0a65d66ed57f24efb7fbd96dc455b3732.tar.gz
openvpn-cf93f0e0a65d66ed57f24efb7fbd96dc455b3732.tar.xz
openvpn-cf93f0e0a65d66ed57f24efb7fbd96dc455b3732.zip
Fix compiling with --disable-management
Some of the MANAGEMENT_QUERY_REMOTE were actually needed. Put #ifdef ENABLE_MANAGMENT in their place Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1341479835-12963-1-git-send-email-arne@rfc2549.org Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r--src/openvpn/init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index f67745f..f86fc38 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -206,6 +206,7 @@ management_callback_http_proxy_fallback_cmd (void *arg, const char *server, cons
#endif
+#ifdef ENABLE_MANAGEMENT
static bool
management_callback_remote_cmd (void *arg, const char **p)
{
@@ -285,6 +286,7 @@ ce_management_query_remote (struct context *c, const char *remote_ip_hint)
gc_free (&gc);
return ret;
}
+#endif /* ENABLE_MANAGEMENT */
/*
* Initialize and possibly randomize connection list.
@@ -396,7 +398,7 @@ next_connection_entry (struct context *c)
ce_defined = false;
c->options.ce = *ce;
-
+#ifdef ENABLE_MANAGEMENT
if (ce_defined && management && management_query_remote_enabled(management))
{
/* allow management interface to override connection entry details */
@@ -404,6 +406,7 @@ next_connection_entry (struct context *c)
if (IS_SIG (c))
break;
} else
+#endif
if (remote_ip_hint)
c->options.ce.remote = remote_ip_hint;
@@ -3168,7 +3171,9 @@ init_management_callback_p2p (struct context *c)
#if HTTP_PROXY_FALLBACK
cb.http_proxy_fallback_cmd = management_callback_http_proxy_fallback_cmd;
#endif
+#ifdef ENABLE_MANAGEMENT
cb.remote_cmd = management_callback_remote_cmd;
+#endif
management_set_callback (management, &cb);
}
#endif