From: William A. Rowe Jr Date: Fri, 3 Aug 2001 00:59:01 +0000 (+0000) Subject: Provide an ap_set_deprecated() fn for quick-and-dirty 'we don't do this' X-Git-Tag: 2.0.23~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f9b514613df5f052639712247a5aa3954f4f9bd;p=apache Provide an ap_set_deprecated() fn for quick-and-dirty 'we don't do this' entries in the command table. (Also fixes a nit about returning a single bit of an apr_int_64 as an int. Know how this group loves !! expresssions :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89896 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_config.h b/include/http_config.h index 9e4a524d47..84903fbbfc 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -505,7 +505,19 @@ AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, void *struct_pt * @return An error string or NULL on success */ AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg); - +/** + * Generic command handling function to respond with cmd->help as an error + * @param cmd The command parameters for this directive + * @param struct_ptr pointer into a given type + * @param arg The argument to the directive + * @return The cmd->help value as the error string + * @tip This allows simple declarations such as; + *
+ *     AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL, 
+ *         "The Foo directive is no longer supported, use Bar"),
+ * 
+ */ +AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const char *arg); /** * For modules which need to read config files, open logs, etc. ... * this returns the fname argument if it begins with '/'; otherwise diff --git a/server/config.c b/server/config.c index 1896d61772..a8f1f26b5e 100644 --- a/server/config.c +++ b/server/config.c @@ -362,7 +362,7 @@ AP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method) { * added by a module and registered. */ if (methnum != M_INVALID) { - return (cmd->limited & (1<limited & (1<cmd->errmsg; +} + /***************************************************************** * * Reading whole config files...