You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2005/10/09 16:31:59 UTC

svn commit: r307440 - in /httpd/httpd/branches/2.2.x: ./ modules/ modules/database/ modules/experimental/ modules/filters/

Author: niq
Date: Sun Oct  9 07:31:40 2005
New Revision: 307440

URL: http://svn.apache.org/viewcvs?rev=307440&view=rev
Log:
Sync module moves (dbd, filter, charset_lite) and dbd updates with trunk

Added:
    httpd/httpd/branches/2.2.x/modules/database/
    httpd/httpd/branches/2.2.x/modules/database/Makefile.in
      - copied unchanged from r307433, httpd/httpd/trunk/modules/database/Makefile.in
    httpd/httpd/branches/2.2.x/modules/database/NWGNUmakefile
      - copied unchanged from r307433, httpd/httpd/trunk/modules/database/NWGNUmakefile
    httpd/httpd/branches/2.2.x/modules/database/config.m4
      - copied unchanged from r307433, httpd/httpd/trunk/modules/database/config.m4
    httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c
      - copied, changed from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.c
    httpd/httpd/branches/2.2.x/modules/database/mod_dbd.h
      - copied, changed from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.h
    httpd/httpd/branches/2.2.x/modules/filters/NWGNUcharsetl
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/NWGNUcharsetl
    httpd/httpd/branches/2.2.x/modules/filters/NWGNUmod_filter
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmod_filter
    httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.c
    httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.dsp
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.dsp
    httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.exp
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.exp
    httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c
      - copied unchanged from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_filter.c
Removed:
    httpd/httpd/branches/2.2.x/modules/experimental/NWGNUcharsetl
    httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmod_filter
    httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.c
    httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.dsp
    httpd/httpd/branches/2.2.x/modules/experimental/mod_charset_lite.exp
    httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.c
    httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.h
    httpd/httpd/branches/2.2.x/modules/experimental/mod_filter.c
Modified:
    httpd/httpd/branches/2.2.x/Apache.dsw
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/NWGNUmakefile
    httpd/httpd/branches/2.2.x/modules/README
    httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmakefile
    httpd/httpd/branches/2.2.x/modules/experimental/config.m4
    httpd/httpd/branches/2.2.x/modules/filters/NWGNUmakefile
    httpd/httpd/branches/2.2.x/modules/filters/config.m4

Modified: httpd/httpd/branches/2.2.x/Apache.dsw
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/Apache.dsw?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/Apache.dsw (original)
+++ httpd/httpd/branches/2.2.x/Apache.dsw Sun Oct  9 07:31:40 2005
@@ -1044,7 +1044,7 @@
 
 ###############################################################################
 
-Project: "mod_charset_lite"=.\modules\experimental\mod_charset_lite.dsp - Package Owner=<4>
+Project: "mod_charset_lite"=.\modules\filters\mod_charset_lite.dsp - Package Owner=<4>
 
 Package=<5>
 {{{

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/CHANGES?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sun Oct  9 07:31:40 2005
@@ -1,6 +1,14 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.1.9
 
+  *) Support dbd connection tied to conn_rec in mod_dbd [Nick Kew]
+
+  *) Fix use of pools in mod_dbd [Brian J France, Nick Kew]
+
+  *) Move mod_dbd to modules/database [Nick Kew]
+
+  *) Move mod_filter and mod_charset_lite to modules/filters [Nick Kew]
+
   *) mod_proxy_ajp: mod_proxy_ajp sends empty SSL attributes for non SSL
      connections. PR36883.
      [William Barker <william.barker wilshire.com>, Ruediger Pluem]

Modified: httpd/httpd/branches/2.2.x/modules/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/NWGNUmakefile?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.2.x/modules/NWGNUmakefile Sun Oct  9 07:31:40 2005
@@ -17,6 +17,7 @@
 	metadata \
 	proxy \
 	filters \
+	database \
 	$(EOLIST) 
 
 # If LDAPSDK has been defined then build the util_ldap module

Modified: httpd/httpd/branches/2.2.x/modules/README
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/README?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/README (original)
+++ httpd/httpd/branches/2.2.x/modules/README Sun Oct  9 07:31:40 2005
@@ -10,6 +10,9 @@
   This directory houses modules that implement file and data caching
   capability.
 
+database/
+  The apache DBD framework manages connections to SQL backends efficiently.
+
 dav/
   This directory houses modules that implement WebDAV functionality.
 

Copied: httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c (from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.c)
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c?p2=httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c&p1=httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.c&r1=307436&r2=307440&rev=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.c (original)
+++ httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c Sun Oct  9 07:31:40 2005
@@ -420,6 +420,29 @@
     }
     return req->conn;
 }
+ap_dbd_t *ap_dbd_cacquire(conn_rec *c)
+{
+    svr_cfg *svr;
+    dbd_pool_rec *req = ap_get_module_config(c->conn_config, &dbd_module);
+    if (!req) {
+        req = apr_palloc(c->pool, sizeof(dbd_pool_rec));
+        req->conn = ap_dbd_open(c->pool, c->base_server);
+        if (req->conn) {
+            svr = ap_get_module_config(c->base_server->module_config, &dbd_module);
+            ap_set_module_config(c->conn_config, &dbd_module, req);
+            if (svr->persist) {
+                req->dbpool = svr->dbpool;
+                apr_pool_cleanup_register(c->pool, req, dbd_release,
+                                          apr_pool_cleanup_null);
+            }
+            else {
+                apr_pool_cleanup_register(c->pool, req->conn, dbd_close,
+                                          apr_pool_cleanup_null);
+            }
+        }
+    }
+    return req->conn;
+}
 #else
 ap_dbd_t *ap_dbd_acquire(request_rec *r)
 {
@@ -428,7 +451,7 @@
     if (!ret) {
         svr = ap_get_module_config(r->server->module_config, &dbd_module);
         ret = ap_dbd_open(r->pool, r->server);
-        if ( ret ) {
+        if (ret) {
             ap_set_module_config(r->request_config, &dbd_module, ret);
             if (!svr->persist) {
                 apr_pool_cleanup_register(r->pool, svr->conn, dbd_close,
@@ -439,6 +462,24 @@
     }
     return ret;
 }
+ap_dbd_t *ap_dbd_cacquire(conn_rec *c)
+{
+    svr_cfg *svr;
+    ap_dbd_t *ret = ap_get_module_config(c->conn_config, &dbd_module);
+    if (!ret) {
+        svr = ap_get_module_config(c->base_server->module_config, &dbd_module);
+        ret = ap_dbd_open(c->pool, c->base_server);
+        if (ret) {
+            ap_set_module_config(c->conn_config, &dbd_module, ret);
+            if (!svr->persist) {
+                apr_pool_cleanup_register(c->pool, svr->conn, dbd_close,
+                                          apr_pool_cleanup_null);
+            }
+            /* if persist then dbd_open registered cleanup on proc pool */
+        }
+    }
+    return ret;
+}
 #endif
 
 static void dbd_hooks(apr_pool_t *pool)
@@ -449,6 +490,7 @@
     APR_REGISTER_OPTIONAL_FN(ap_dbd_open);
     APR_REGISTER_OPTIONAL_FN(ap_dbd_close);
     APR_REGISTER_OPTIONAL_FN(ap_dbd_acquire);
+    APR_REGISTER_OPTIONAL_FN(ap_dbd_cacquire);
     APR_REGISTER_OPTIONAL_FN(ap_dbd_prepare);
     apr_dbd_init(pool);
 }

Copied: httpd/httpd/branches/2.2.x/modules/database/mod_dbd.h (from r307436, httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.h)
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/database/mod_dbd.h?p2=httpd/httpd/branches/2.2.x/modules/database/mod_dbd.h&p1=httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.h&r1=307436&r2=307440&rev=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/experimental/mod_dbd.h (original)
+++ httpd/httpd/branches/2.2.x/modules/database/mod_dbd.h Sun Oct  9 07:31:40 2005
@@ -58,6 +58,12 @@
  */
 AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
 
+/* acquire a connection that will have the lifetime of a connection
+ * and MUST NOT be explicitly closed.  Return NULL on error.
+ * This is the preferred function for most applications.
+ */
+AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
+
 /* Prepare a statement for use by a client module */
 AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);
 
@@ -65,6 +71,7 @@
 APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
 APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
 APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
+APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
 APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
 
 #endif

Modified: httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmakefile?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.2.x/modules/experimental/NWGNUmakefile Sun Oct  9 07:31:40 2005
@@ -152,9 +152,7 @@
 # If there is an NLM target, put it here
 #
 TARGET_nlm = \
-	$(OBJDIR)/charsetl.nlm \
 	$(OBJDIR)/example.nlm \
-	$(OBJDIR)/mod_filter.nlm \
 	$(EOLIST)
 	
 #

Modified: httpd/httpd/branches/2.2.x/modules/experimental/config.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/experimental/config.m4?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/experimental/config.m4 (original)
+++ httpd/httpd/branches/2.2.x/modules/experimental/config.m4 Sun Oct  9 07:31:40 2005
@@ -1,17 +1,8 @@
 
 APACHE_MODPATH_INIT(experimental)
 
-if test "$ac_cv_ebcdic" = "yes"; then
-# mod_charset_lite can be very useful on an ebcdic system, 
-#   so include it by default
-    APACHE_MODULE(charset_lite, character set translation, , , yes)
-else
-    APACHE_MODULE(charset_lite, character set translation, , , no)
-fi
-
 APACHE_MODULE(example, example and demo module, , , no)
 APACHE_MODULE(case_filter, example uppercase conversion filter, , , no)
 APACHE_MODULE(case_filter_in, example uppercase conversion input filter, , , no)
-APACHE_MODULE(filter, smart filtering module, , , no)
 
 APACHE_MODPATH_FINISH

Modified: httpd/httpd/branches/2.2.x/modules/filters/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/filters/NWGNUmakefile?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/NWGNUmakefile Sun Oct  9 07:31:40 2005
@@ -153,6 +153,8 @@
 #
 TARGET_nlm = \
 	$(OBJDIR)/extfiltr.nlm \
+	$(OBJDIR)/charsetl.nlm \
+	$(OBJDIR)/mod_filter.nlm \
 	$(EOLIST)
 	
 # If the zlib libraries source exists then build the mod_deflate module

Modified: httpd/httpd/branches/2.2.x/modules/filters/config.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/filters/config.m4?rev=307440&r1=307439&r2=307440&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/config.m4 (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/config.m4 Sun Oct  9 07:31:40 2005
@@ -6,6 +6,16 @@
 
 APACHE_MODULE(ext_filter, external filter module, , , most)
 APACHE_MODULE(include, Server Side Includes, , , yes)
+APACHE_MODULE(filter, Smart Filtering, , , yes)
+
+if test "$ac_cv_ebcdic" = "yes"; then
+# mod_charset_lite can be very useful on an ebcdic system,
+#   so include it by default
+    APACHE_MODULE(charset_lite, character set translation, , , yes)
+else
+    APACHE_MODULE(charset_lite, character set translation, , , no)
+fi
+
 
 APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
   AC_ARG_WITH(z, APACHE_HELP_STRING(--with-z=DIR,use a specific zlib library),