From d8c187453a6d29ecc6530d09080c7b6e1d70e958 Mon Sep 17 00:00:00 2001 From: Thomas Porzelt Date: Sat, 15 May 2010 12:46:41 +0200 Subject: [PATCH] [mod_debug] Don't compile debug.profiler_dump action at all when profiler support missing --- src/modules/mod_debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/mod_debug.c b/src/modules/mod_debug.c index 1a93d4a..f84cbfe 100644 --- a/src/modules/mod_debug.c +++ b/src/modules/mod_debug.c @@ -312,15 +312,14 @@ static liAction* debug_show_connections_create(liServer *srv, liWorker *wrk, liP return li_action_new_function(debug_show_connections, debug_show_connections_cleanup, NULL, p); } +#ifdef WITH_PROFILER static liHandlerResult debug_profiler_dump(liVRequest *vr, gpointer param, gpointer *context) { UNUSED(vr); UNUSED(param); UNUSED(context); -#ifdef WITH_PROFILER if (!getenv("LIGHTY_PROFILE_MEM")) return LI_HANDLER_GO_ON; li_profiler_dump(); -#endif return LI_HANDLER_GO_ON; } @@ -335,6 +334,7 @@ static liAction* debug_profiler_dump_create(liServer *srv, liWorker *wrk, liPlug return li_action_new_function(debug_profiler_dump, NULL, NULL, p); } +#endif static const liPluginOption options[] = { @@ -343,7 +343,9 @@ static const liPluginOption options[] = { static const liPluginAction actions[] = { { "debug.show_connections", debug_show_connections_create, NULL }, +#ifdef WITH_PROFILER { "debug.profiler_dump", debug_profiler_dump_create, NULL }, +#endif { NULL, NULL, NULL } };