]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix compiling with --disable-management
authorArne Schwabe <arne@rfc2549.org>
Thu, 5 Jul 2012 09:17:15 +0000 (11:17 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 5 Jul 2012 11:39:35 +0000 (13:39 +0200)
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>
src/openvpn/init.c

index f67745fc9b8da71582f6f2cd602d52568939dabc..f86fc383e7ba0efa27fabede288f7a8e2ec3aa2f 100644 (file)
@@ -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