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>
... | ... |
@@ -206,6 +206,7 @@ management_callback_http_proxy_fallback_cmd (void *arg, const char *server, cons |
206 | 206 |
|
207 | 207 |
#endif |
208 | 208 |
|
209 |
+#ifdef ENABLE_MANAGEMENT |
|
209 | 210 |
static bool |
210 | 211 |
management_callback_remote_cmd (void *arg, const char **p) |
211 | 212 |
{ |
... | ... |
@@ -285,6 +286,7 @@ ce_management_query_remote (struct context *c, const char *remote_ip_hint) |
285 | 285 |
gc_free (&gc); |
286 | 286 |
return ret; |
287 | 287 |
} |
288 |
+#endif /* ENABLE_MANAGEMENT */ |
|
288 | 289 |
|
289 | 290 |
/* |
290 | 291 |
* Initialize and possibly randomize connection list. |
... | ... |
@@ -396,7 +398,7 @@ next_connection_entry (struct context *c) |
396 | 396 |
ce_defined = false; |
397 | 397 |
|
398 | 398 |
c->options.ce = *ce; |
399 |
- |
|
399 |
+#ifdef ENABLE_MANAGEMENT |
|
400 | 400 |
if (ce_defined && management && management_query_remote_enabled(management)) |
401 | 401 |
{ |
402 | 402 |
/* allow management interface to override connection entry details */ |
... | ... |
@@ -404,6 +406,7 @@ next_connection_entry (struct context *c) |
404 | 404 |
if (IS_SIG (c)) |
405 | 405 |
break; |
406 | 406 |
} else |
407 |
+#endif |
|
407 | 408 |
if (remote_ip_hint) |
408 | 409 |
c->options.ce.remote = remote_ip_hint; |
409 | 410 |
|
... | ... |
@@ -3168,7 +3171,9 @@ init_management_callback_p2p (struct context *c) |
3168 | 3168 |
#if HTTP_PROXY_FALLBACK |
3169 | 3169 |
cb.http_proxy_fallback_cmd = management_callback_http_proxy_fallback_cmd; |
3170 | 3170 |
#endif |
3171 |
+#ifdef ENABLE_MANAGEMENT |
|
3171 | 3172 |
cb.remote_cmd = management_callback_remote_cmd; |
3173 |
+#endif |
|
3172 | 3174 |
management_set_callback (management, &cb); |
3173 | 3175 |
} |
3174 | 3176 |
#endif |