Rename module name in doxygen + partly revert r832442 which skipped doxygen doc generation for 'mod_watchdog.h'
s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles
Use ap_remove_input_filter_byhandle instead of duplicating the code.
Remove some 'register' in variable declaration.
Remove some 'register' in variable declaration.
Save a few cycles by calling 'apr_isalnum' instead of 'apr_isalpha' and 'apr_isdigit'.
Do not use deprecated define.
No change in generated code because MODULE_MAGIC_NUMBER is defined as:
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1622705 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * Easy patches - synch with trunk
- - mod_watchdog: Rename module name in doxygen + partly revert r832442 which
- skipped doxygen doc generation for 'mod_watchdog.h'
- - mod_proxy: s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles
- - mod_proxy_wstunnel: Use ap_remove_input_filter_byhandle instead of
- duplicating the code.
- - Remove some 'register' in variable declaration.
- - core: Remove some 'register' in variable declaration.
- Save a few cycles by calling 'apr_isalnum' instead of
- 'apr_isalpha' and 'apr_isdigit'.
- - Do not use deprecated define. s/MODULE_MAGIC_NUMBER/MODULE_MAGIC_NUMBER_MAJOR/
- trunk patch:
- http://svn.apache.org/r1597642
- http://svn.apache.org/r1608999
- http://svn.apache.org/r1605207
- http://svn.apache.org/r1610366
- http://svn.apache.org/r1610353
- http://svn.apache.org/r1611871
- 2.4.x patch: http://people.apache.org/~jailletc36/backport9.patch
- +1: jailletc36, ylavic, jim
-
* Add some missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split some lines longer than 80.
else if (strcEQ(var, "SERVER_SOFTWARE"))
result = ap_get_server_banner();
else if (strcEQ(var, "API_VERSION")) {
- result = apr_itoa(p, MODULE_MAGIC_NUMBER);
+ result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
resdup = FALSE;
}
else if (strcEQ(var, "TIME_YEAR")) {
* @file mod_watchdog.h
* @brief Watchdog module for Apache
*
- * @defgroup MOD_WATCHDOG watchdog
+ * @defgroup MOD_WATCHDOG mod_watchdog
* @ingroup APACHE_MODS
- * \@{
+ * @{
*/
#include "httpd.h"
#endif
#endif /* MOD_WATCHDOG_H */
-/** \@} */
+/** @} */
apr_int32_t autoindex_opts, int desc_width)
{
int maxsize = desc_width;
- register int x;
+ int x;
/*
* If there's no DescriptionWidth in effect, default to the old
return str;
}
/* OK, this is syntax we want to interpolate. Is there such a var ? */
- var = apr_pstrndup(r->pool, start+2, end-(start+2));
+ var = apr_pstrmemdup(r->pool, start+2, end-(start+2));
val = apr_table_get(r->subprocess_env, var);
- firstpart = apr_pstrndup(r->pool, str, (start-str));
+ firstpart = apr_pstrmemdup(r->pool, str, (start-str));
if (val == NULL) {
return apr_pstrcat(r->pool, firstpart,
return HTTP_MOVED_PERMANENTLY;
}
- scheme = apr_pstrndup(r->pool, uri, p - uri);
+ scheme = apr_pstrmemdup(r->pool, uri, p - uri);
/* Check URI's destination host against NoProxy hosts */
/* Bypass ProxyRemote server lookup if configured as NoProxy */
for (direct_connect = i = 0; i < conf->dirconn->nelts &&
apr_bucket_brigade *out = apr_brigade_create(p, c->bucket_alloc);
apr_status_t rv;
- register int n;
+ int n;
char *dir, *path, *reldir, *site, *str, *type;
const char *pwd = apr_table_get(r->notes, "Directory-PWD");
return rv;
}
-/* Search thru the input filters and remove the reqtimeout one */
-static void remove_reqtimeout(ap_filter_t *next)
-{
- ap_filter_t *reqto = NULL;
- ap_filter_rec_t *filter;
-
- filter = ap_get_input_filter_handle("reqtimeout");
- if (!filter) {
- return;
- }
-
- while (next) {
- if (next->frec == filter) {
- reqto = next;
- break;
- }
- next = next->next;
- }
- if (reqto) {
- ap_remove_input_filter(reqto);
- }
-}
-
/*
* process the request and write the response.
*/
pollfd.desc.s = client_socket;
apr_pollset_add(pollset, &pollfd);
- remove_reqtimeout(c->input_filters);
+ ap_remove_input_filter_byhandle(c->input_filters, "reqtimeout");
r->output_filters = c->output_filters;
r->proto_output_filters = c->output_filters;
else if (strcEQ(var, "SERVER_SOFTWARE"))
result = ap_get_server_banner();
else if (strcEQ(var, "API_VERSION")) {
- result = apr_itoa(p, MODULE_MAGIC_NUMBER);
+ result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
resdup = FALSE;
}
else if (strcEQ(var, "TIME_YEAR")) {
AP_DECLARE(int) ap_is_matchexp(const char *str)
{
- register int x;
+ int x;
for (x = 0; str[x]; x++)
if ((str[x] == '*') || (str[x] == '?'))
while (name[l] != '\0') {
if (name[l] == '.' && name[l + 1] == '.' && IS_SLASH(name[l + 2])
&& (l == 0 || IS_SLASH(name[l - 1]))) {
- register int m = l + 3, n;
+ int m = l + 3, n;
l = l - 2;
if (l >= 0) {
AP_DECLARE(int) ap_count_dirs(const char *path)
{
- register int x, n;
+ int x, n;
for (x = 0, n = 0; path[x]; x++)
if (path[x] == '/')
static char x2c(const char *what)
{
- register char digit;
+ char digit;
#if !APR_CHARSET_EBCDIC
digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10
static int unescape_url(char *url, const char *forbid, const char *reserved)
{
- register int badesc, badpath;
+ int badesc, badpath;
char *x, *y;
badesc = 0;
*/
AP_DECLARE(int) ap_is_url(const char *u)
{
- register int x;
+ int x;
for (x = 0; u[x] != ':'; x++) {
if ((!u[x]) ||
- ((!apr_isalpha(u[x])) && (!apr_isdigit(u[x])) &&
+ ((!apr_isalnum(u[x])) &&
(u[x] != '+') && (u[x] != '-') && (u[x] != '.'))) {
return 0;
}
case 8:
return ap_get_server_banner();
case 9:
- return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER);
+ return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER_MAJOR);
default:
ap_assert(0);
}
static int get_line(char *s, int n, apr_file_t *f)
{
- register int i = 0;
+ int i = 0;
char ch;
apr_status_t rv = APR_EINVAL;