You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by is...@apache.org on 2008/04/27 14:12:47 UTC
svn commit: r651932 - in /httpd/sandbox/mod_domain: mod_dns.c mod_dns.h
Author: issac
Date: Sun Apr 27 05:12:46 2008
New Revision: 651932
URL: http://svn.apache.org/viewvc?rev=651932&view=rev
Log:
Add hook for dns_create_request which passes both dns_message_t and request_rec (the latter is needed to add filters)
Fix DNSAddMX to work inside virtualhosts properly
Modified:
httpd/sandbox/mod_domain/mod_dns.c
httpd/sandbox/mod_domain/mod_dns.h
Modified: httpd/sandbox/mod_domain/mod_dns.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/mod_domain/mod_dns.c?rev=651932&r1=651931&r2=651932&view=diff
==============================================================================
--- httpd/sandbox/mod_domain/mod_dns.c (original)
+++ httpd/sandbox/mod_domain/mod_dns.c Sun Apr 27 05:12:46 2008
@@ -39,6 +39,7 @@
APR_HOOK_STRUCT(
APR_HOOK_LINK(post_read_request)
+ APR_HOOK_LINK(create_request)
APR_HOOK_LINK(handler)
)
@@ -47,6 +48,11 @@
(dns),
OK, DECLINED)
+APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(dns, DNS, int, create_request,
+ (request_rec *r, dns_message_t *dns),
+ (r, dns),
+ OK, DECLINED)
+
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(dns, DNS, int, handler,
(request_rec *r),
(r), DECLINED)
@@ -128,6 +134,7 @@
/** Let other modules do what they need now */
ap_run_create_request(r);
+ dns_run_create_request(r, dns);
return r;
}
@@ -676,7 +683,8 @@
dns_module_config_t *conf;
dns_rdata_mx_t *mx;
- const char *err = ap_check_cmd_context(parms, GLOBAL_ONLY);
+ const char *err = ap_check_cmd_context(parms,
+ NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
if (err) {
return err;
}
Modified: httpd/sandbox/mod_domain/mod_dns.h
URL: http://svn.apache.org/viewvc/httpd/sandbox/mod_domain/mod_dns.h?rev=651932&r1=651931&r2=651932&view=diff
==============================================================================
--- httpd/sandbox/mod_domain/mod_dns.h (original)
+++ httpd/sandbox/mod_domain/mod_dns.h Sun Apr 27 05:12:46 2008
@@ -515,6 +515,8 @@
*/
APR_DECLARE_EXTERNAL_HOOK(dns, DNS, int, post_read_request,
(dns_message_t *dns))
+APR_DECLARE_EXTERNAL_HOOK(dns, DNS, int, create_request,
+ (request_rec *r, dns_message_t *dns))
APR_DECLARE_EXTERNAL_HOOK(dns, DNS, int, handler,
(request_rec *r))