From: Ryan Bloom Date: Thu, 17 Aug 2000 14:54:28 +0000 (+0000) Subject: Mod_echo was using raw args instead of a flag to enable and disable X-Git-Tag: APACHE_2_0_ALPHA_6~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc0718f426f76664c2e12366bfec7523ca88eba4;p=apache Mod_echo was using raw args instead of a flag to enable and disable itself. I believe this is what was causing the module to not be able to be enabled and disabled on a per-server basis. This patch makes it use a flag git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86093 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 011c23e409..0c6c4bbb13 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -78,11 +78,11 @@ static void *create_echo_server_config(apr_pool_t *p,server_rec *s) return pConfig; } -static const char *echo_on(cmd_parms *cmd, void *dummy, const char *arg) +static const char *echo_on(cmd_parms *cmd, void *dummy, int arg) { EchoConfig *pConfig=ap_get_module_config(cmd->server->module_config, &echo_module); - pConfig->bEnabled=1; + pConfig->bEnabled=arg; return NULL; } @@ -112,8 +112,8 @@ static int process_echo_connection(conn_rec *c) static const command_rec echo_cmds[] = { - AP_INIT_RAW_ARGS("ProtocolEcho", echo_on, NULL, RSRC_CONF, - "Run an echo server on this host"), + AP_INIT_FLAG("ProtocolEcho", echo_on, NULL, RSRC_CONF, + "Run an echo server on this host"), { NULL } };