Skip to contentSkip to conversation

Fix compiling with --disable-management

PATCH In review Arne Schwabe 2 participants 2 messages Jul 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compiling with --disable-management

Some of the MANAGEMENT_QUERY_REMOTE were actually needed. Put #ifdef ENABLE_MANAGMENT in their place

---
 src/openvpn/init.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
src/openvpn/init.c +6 -1
index f67745f..f86fc38 100644
@@ -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
Signature · 1 line
1.7.7.5 (Apple Git-26)
#1 lore raw
Quoted 6 lines · Arne Schwabe

Some of the MANAGEMENT_QUERY_REMOTE were actually needed. Put #ifdef ENABLE_MANAGMENT in their place

---
 src/openvpn/init.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

ACK. Applied to master.

commit cf93f0e0a65d66ed57f24efb7fbd96dc455b3732

Author: Arne Schwabe <[email protected]...>
Date:   Thu Jul 5 11:17:15 2012 +0200
    Fix compiling with --disable-management
        
    Signed-off-by: Arne Schwabe <[email protected]...>
    Acked-by: David Sommerseth <[email protected]...>
    Message-Id: [email protected]...
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth