Author: joes
Date: Sat Jan 10 07:51:20 2009
New Revision: 733288
URL: http://svn.apache.org/viewvc?rev=733288&view=rev
Log:
add optional interface for apreq_handle_apache2()
Modified:
httpd/apreq/trunk/CHANGES
httpd/apreq/trunk/module/apache2/apreq_module_apache2.h
httpd/apreq/trunk/module/apache2/filter.c
httpd/apreq/trunk/module/t/c-modules/apreq_access_test/mod_apreq_access_test.c
Modified: httpd/apreq/trunk/CHANGES
URL:
http://svn.apache.org/viewvc/httpd/apreq/trunk/CHANGES?rev=733288&r1=733287&r2=733288&view=diff
==============================================================================
--- httpd/apreq/trunk/CHANGES (original)
+++ httpd/apreq/trunk/CHANGES Sat Jan 10 07:51:20 2009
@@ -5,6 +5,9 @@
@section v2_10 Changes with libapreq2-2.10 (under developement)
- C API [joes]
+ Add optional interface for apreq_handle_apache2().
+
+- C API [joes]
Clean up buggy apreq_hook_find_param().
- Perl Glue Build [Philip M. Gollucci]
Modified: httpd/apreq/trunk/module/apache2/apreq_module_apache2.h
URL:
http://svn.apache.org/viewvc/httpd/apreq/trunk/module/apache2/apreq_module_apache2.h?rev=733288&r1=733287&r2=733288&view=diff
==============================================================================
--- httpd/apreq/trunk/module/apache2/apreq_module_apache2.h (original)
+++ httpd/apreq/trunk/module/apache2/apreq_module_apache2.h Sat Jan 10 07:51:20
2009
@@ -19,6 +19,7 @@
#define APREQ_APACHE2_H
#include "apreq_module.h"
+#include "apr_optional.h"
#include <httpd.h>
#ifdef __cplusplus
@@ -141,6 +142,12 @@
APREQ_DECLARE(apreq_handle_t *) apreq_handle_apache2(request_rec *r);
/**
+ *
+ *
+ */
+APR_DECLARE_OPTIONAL_FN(apreq_handle_t *,apreq_handle_apache2, (request_rec
*r));
+
+/**
* The mod_apreq2 filter is named "apreq2", and may be used in Apache's
* input filter directives, e.g.
* @code
Modified: httpd/apreq/trunk/module/apache2/filter.c
URL:
http://svn.apache.org/viewvc/httpd/apreq/trunk/module/apache2/filter.c?rev=733288&r1=733287&r2=733288&view=diff
==============================================================================
--- httpd/apreq/trunk/module/apache2/filter.c (original)
+++ httpd/apreq/trunk/module/apache2/filter.c Sat Jan 10 07:51:20 2009
@@ -417,6 +417,7 @@
"Failed to pre-initialize libapreq2");
return HTTP_INTERNAL_SERVER_ERROR;
}
+ APR_REGISTER_OPTIONAL_FN(apreq_handle_apache2);
return OK;
}
Modified:
httpd/apreq/trunk/module/t/c-modules/apreq_access_test/mod_apreq_access_test.c
URL:
http://svn.apache.org/viewvc/httpd/apreq/trunk/module/t/c-modules/apreq_access_test/mod_apreq_access_test.c?rev=733288&r1=733287&r2=733288&view=diff
==============================================================================
---
httpd/apreq/trunk/module/t/c-modules/apreq_access_test/mod_apreq_access_test.c
(original)
+++
httpd/apreq/trunk/module/t/c-modules/apreq_access_test/mod_apreq_access_test.c
Sat Jan 10 07:51:20 2009
@@ -69,11 +69,13 @@
apreq_param_t *param;
struct access_test_cfg *cfg = (struct access_test_cfg *)
ap_get_module_config(r->per_dir_config, &apreq_access_test_module);
+ APR_OPTIONAL_FN_TYPE(apreq_handle_apache2) *fcn =
+ APR_RETRIEVE_OPTIONAL_FN(apreq_handle_apache2);
- if (!cfg || !cfg->param)
+ if (!cfg || !cfg->param || !fcn)
return DECLINED;
- handle = apreq_handle_apache2(r);
+ handle = fcn(r);
param = apreq_param(handle, cfg->param);
if (param != NULL) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,