You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/12/14 04:50:22 UTC

svn commit: r604096 - in /httpd/mod_ftp/trunk: include/mod_ftp.h modules/ftp/ftp_commands.c modules/ftp/ftp_connection.c modules/ftp/ftp_limitlogin.c

Author: wrowe
Date: Thu Dec 13 19:50:20 2007
New Revision: 604096

URL: http://svn.apache.org/viewvc?rev=604096&view=rev
Log:
In the relentless pursuit of dodging c->pool, move ftp_limitlogin_loggedout
database access into the appropriate pool for our circumstances
(r->pool during a re-init, or c->pool during connection shutdown).

Modified:
    httpd/mod_ftp/trunk/include/mod_ftp.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c

Modified: httpd/mod_ftp/trunk/include/mod_ftp.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/include/mod_ftp.h?rev=604096&r1=604095&r2=604096&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/include/mod_ftp.h (original)
+++ httpd/mod_ftp/trunk/include/mod_ftp.h Thu Dec 13 19:50:20 2007
@@ -385,7 +385,7 @@
 apr_status_t ftp_mutexdb_child_init(server_rec *s, apr_pool_t *p);
 apr_status_t ftp_mutexdb_cleanup(void *dummy);
 ftp_loginlimit_t ftp_limitlogin_check(const char *user, request_rec *r);
-int ftp_limitlogin_loggedout(const char *user, conn_rec *c);
+int ftp_limitlogin_loggedout(const char *user, conn_rec *c, apr_pool_t *pool);
 
 /* FTP utilities
  *

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c?rev=604096&r1=604095&r2=604096&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Thu Dec 13 19:50:20 2007
@@ -2711,7 +2711,7 @@
 
     /* Implicit logout */
     if (fc->logged_in) {
-        ftp_limitlogin_loggedout(fc->user, c);
+        ftp_limitlogin_loggedout(fc->user, c, r->pool);
     }
     fc->logged_in        = 0;
     

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c?rev=604096&r1=604095&r2=604096&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c Thu Dec 13 19:50:20 2007
@@ -286,7 +286,7 @@
         }
     }
     if (fc->logged_in) {
-        ftp_limitlogin_loggedout(fc->user, c);
+        ftp_limitlogin_loggedout(fc->user, c, c->pool);
     }
     return OK;
 }

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c?rev=604096&r1=604095&r2=604096&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c Thu Dec 13 19:50:20 2007
@@ -245,7 +245,7 @@
     return FTP_LIMIT_OK;
 }
 
-int ftp_limitlogin_loggedout(const char *user, conn_rec *c)
+int ftp_limitlogin_loggedout(const char *user, conn_rec *c, apr_pool_t *pool)
 {
     apr_status_t rv;
     apr_datum_t ukey;
@@ -265,7 +265,8 @@
     
     ftp_mutex_on();
     if ((rv = apr_dbm_open(&dbf, fsc->limitdbfile,
-                           APR_DBM_RWCREATE, FTP_DB_FILE_MODE, c->pool)) != APR_SUCCESS) {
+                           APR_DBM_RWCREATE, FTP_DB_FILE_MODE, pool))
+            != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, c->base_server,
                      "Cannot open FTPLimitDBFile file `%s' for logged out update",
                      fsc->limitdbfile);