You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/18 23:01:22 UTC
cvs commit: apache-2.0/src/modules/standard mod_access.c
trawick 00/06/18 14:01:21
Modified: src/modules/standard mod_access.c
Log:
Use the new command-handler initializer macros in mod_access;
clean up the resulting warnings.
Revision Changes Path
1.14 +10 -8 apache-2.0/src/modules/standard/mod_access.c
Index: mod_access.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_access.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_access.c 2000/06/12 21:46:56 1.13
+++ mod_access.c 2000/06/18 21:01:21 1.14
@@ -129,7 +129,7 @@
return (void *) conf;
}
-static const char *order(cmd_parms *cmd, void *dv, char *arg)
+static const char *order(cmd_parms *cmd, void *dv, const char *arg)
{
access_dir_conf *d = (access_dir_conf *) dv;
int i, o;
@@ -157,11 +157,13 @@
return (*host == '\0');
}
-static const char *allow_cmd(cmd_parms *cmd, void *dv, char *from, char *where)
+static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
+ const char *where_c)
{
access_dir_conf *d = (access_dir_conf *) dv;
allowdeny *a;
char *s;
+ char *where = ap_pstrdup(cmd->pool, where_c);
if (strcasecmp(from, "from"))
return "allow and deny must be followed by 'from'";
@@ -273,12 +275,12 @@
static const command_rec access_cmds[] =
{
- {"order", order, NULL, OR_LIMIT, TAKE1,
- "'allow,deny', 'deny,allow', or 'mutual-failure'"},
- {"allow", allow_cmd, &its_an_allow, OR_LIMIT, ITERATE2,
- "'from' followed by hostnames or IP-address wildcards"},
- {"deny", allow_cmd, NULL, OR_LIMIT, ITERATE2,
- "'from' followed by hostnames or IP-address wildcards"},
+ AP_INIT_TAKE1("order", order, NULL, OR_LIMIT,
+ "'allow,deny', 'deny,allow', or 'mutual-failure'"),
+ AP_INIT_ITERATE2("allow", allow_cmd, &its_an_allow, OR_LIMIT,
+ "'from' followed by hostnames or IP-address wildcards"),
+ AP_INIT_ITERATE2("deny", allow_cmd, NULL, OR_LIMIT,
+ "'from' followed by hostnames or IP-address wildcards"),
{NULL}
};