mirror of
https://github.com/apache/httpd.git
synced 2025-11-06 16:49:32 +03:00
Namespaces namespaces namespaces guys... EFAIL :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -123,7 +123,7 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
|
||||
/* Find where we 'stop' going full speed. */
|
||||
for (e = APR_BRIGADE_FIRST(bb);
|
||||
e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
|
||||
if (RL_BUCKET_IS_END(e)) {
|
||||
if (AP_RL_BUCKET_IS_END(e)) {
|
||||
apr_bucket *f;
|
||||
f = APR_RING_LAST(&bb->list);
|
||||
APR_RING_UNSPLICE(e, f, link);
|
||||
@@ -154,7 +154,7 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
|
||||
while (ctx->state == RATE_LIMIT && !APR_BRIGADE_EMPTY(bb)) {
|
||||
for (e = APR_BRIGADE_FIRST(bb);
|
||||
e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
|
||||
if (RL_BUCKET_IS_START(e)) {
|
||||
if (AP_RL_BUCKET_IS_START(e)) {
|
||||
apr_bucket *f;
|
||||
f = APR_RING_LAST(&bb->list);
|
||||
APR_RING_UNSPLICE(e, f, link);
|
||||
@@ -239,8 +239,8 @@ rl_bucket_read(apr_bucket *b, const char **str,
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_bucket *)
|
||||
rl_end_create(apr_bucket_alloc_t *list)
|
||||
AP_RL_DECLARE(apr_bucket *)
|
||||
ap_rl_end_create(apr_bucket_alloc_t *list)
|
||||
{
|
||||
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
|
||||
|
||||
@@ -250,13 +250,13 @@ AP_DECLARE(apr_bucket *)
|
||||
b->length = 0;
|
||||
b->start = 0;
|
||||
b->data = NULL;
|
||||
b->type = &rl_bucket_type_end;
|
||||
b->type = &ap_rl_bucket_type_end;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_bucket *)
|
||||
rl_start_create(apr_bucket_alloc_t *list)
|
||||
AP_RL_DECLARE(apr_bucket *)
|
||||
ap_rl_start_create(apr_bucket_alloc_t *list)
|
||||
{
|
||||
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
|
||||
|
||||
@@ -266,14 +266,14 @@ AP_DECLARE(apr_bucket *)
|
||||
b->length = 0;
|
||||
b->start = 0;
|
||||
b->data = NULL;
|
||||
b->type = &rl_bucket_type_start;
|
||||
b->type = &ap_rl_bucket_type_start;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AP_DECLARE_DATA const apr_bucket_type_t rl_bucket_type_end = {
|
||||
AP_RL_DECLARE_DATA const apr_bucket_type_t ap_rl_bucket_type_end = {
|
||||
"RL_END", 5, APR_BUCKET_METADATA,
|
||||
apr_bucket_destroy_noop,
|
||||
rl_bucket_read,
|
||||
@@ -283,7 +283,7 @@ AP_DECLARE_DATA const apr_bucket_type_t rl_bucket_type_end = {
|
||||
};
|
||||
|
||||
|
||||
AP_DECLARE_DATA const apr_bucket_type_t rl_bucket_type_start = {
|
||||
AP_RL_DECLARE_DATA const apr_bucket_type_t ap_rl_bucket_type_start = {
|
||||
"RL_START", 5, APR_BUCKET_METADATA,
|
||||
apr_bucket_destroy_noop,
|
||||
rl_bucket_read,
|
||||
|
||||
@@ -17,14 +17,35 @@
|
||||
#ifndef _MOD_RATELIMIT_H_
|
||||
#define _MOD_RATELIMIT_H_
|
||||
|
||||
AP_DECLARE_DATA extern const apr_bucket_type_t rl_bucket_type_end;
|
||||
AP_DECLARE_DATA extern const apr_bucket_type_t rl_bucket_type_start;
|
||||
/* Create a set of AP_RL_DECLARE(type), AP_RL_DECLARE_NONSTD(type) and
|
||||
* AP_RL_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
#define AP_RL_DECLARE(type) type
|
||||
#define AP_RL_DECLARE_NONSTD(type) type
|
||||
#define AP_RL_DECLARE_DATA
|
||||
#elif defined(AP_RL_DECLARE_STATIC)
|
||||
#define AP_RL_DECLARE(type) type __stdcall
|
||||
#define AP_RL_DECLARE_NONSTD(type) type
|
||||
#define AP_RL_DECLARE_DATA
|
||||
#elif defined(AP_RL_DECLARE_EXPORT)
|
||||
#define AP_RL_DECLARE(type) __declspec(dllexport) type __stdcall
|
||||
#define AP_RL_DECLARE_NONSTD(type) __declspec(dllexport) type
|
||||
#define AP_RL_DECLARE_DATA __declspec(dllexport)
|
||||
#else
|
||||
#define AP_RL_DECLARE(type) __declspec(dllimport) type __stdcall
|
||||
#define AP_RL_DECLARE_NONSTD(type) __declspec(dllimport) type
|
||||
#define AP_RL_DECLARE_DATA __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#define RL_BUCKET_IS_END(e) (e->type == &rl_bucket_type_end)
|
||||
#define RL_BUCKET_IS_START(e) (e->type == &rl_bucket_type_start)
|
||||
AP_RL_DECLARE_DATA extern const apr_bucket_type_t ap_rl_bucket_type_end;
|
||||
AP_RL_DECLARE_DATA extern const apr_bucket_type_t ap_rl_bucket_type_start;
|
||||
|
||||
#define AP_RL_BUCKET_IS_END(e) (e->type == &ap_rl_bucket_type_end)
|
||||
#define AP_RL_BUCKET_IS_START(e) (e->type == &ap_rl_bucket_type_start)
|
||||
|
||||
/* TODO: Make these Optional Functions, so that module load order doesn't matter. */
|
||||
apr_bucket* rl_end_create(apr_bucket_alloc_t *list);
|
||||
apr_bucket* rl_start_create(apr_bucket_alloc_t *list);
|
||||
AP_RL_DECLARE(apr_bucket*) ap_rl_end_create(apr_bucket_alloc_t *list);
|
||||
AP_RL_DECLARE(apr_bucket*) ap_rl_start_create(apr_bucket_alloc_t *list);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user