]> granicus.if.org Git - apache/commitdiff
Mod_echo was using raw args instead of a flag to enable and disable
authorRyan Bloom <rbb@apache.org>
Thu, 17 Aug 2000 14:54:28 +0000 (14:54 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 17 Aug 2000 14:54:28 +0000 (14:54 +0000)
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

modules/echo/mod_echo.c

index 011c23e4091bedd37794b6cc9b20bb56e1043bf5..0c6c4bbb1355e690bd7ec59681e4d1d33b5e1fe1 100644 (file)
@@ -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 }
 };