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 2009/05/31 09:39:35 UTC

svn commit: r780375 - /httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c

Author: wrowe
Date: Sun May 31 07:39:35 2009
New Revision: 780375

URL: http://svn.apache.org/viewvc?rev=780375&view=rev
Log:
Eliminate need for mpm.h

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c?rev=780375&r1=780374&r2=780375&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_lowportd.c Sun May 31 07:39:35 2009
@@ -21,7 +21,6 @@
 #include "ap_listen.h"
 #include "ap_mpm.h"
 #include "unixd.h"
-#include "mpm.h"
 
 #ifdef HAVE_FTP_LOWPORTD
 
@@ -57,6 +56,7 @@
 static pid_t parent_pid;
 static pid_t daemon_pid;
 static int daemon_should_exit = 0;
+static server_rec *main_server_conf;
 
 /* The APR other-child API doesn't tell us how the daemon exited
  * (SIGSEGV vs. exit(1)).  The other-child maintenance function
@@ -374,7 +374,7 @@
 #endif
             if (errno != EINTR) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, errno,
-                             (server_rec *)data,
+                             main_server,
                              "FTP Error accepting on lowportd socket");
             }
             continue;
@@ -398,7 +398,7 @@
             continue;
         }
 
-        for (server = ap_server_conf; server; server = server->next)
+        for (server = main_server; server; server = server->next)
              if (server == req.server)
                  break;
         if (!server) {
@@ -468,8 +468,10 @@
 static void lowportd_maint(int reason, void *data, apr_wait_t status);
 
 static int lowportd_start(apr_pool_t *p, server_rec *main_server,
-                      apr_proc_t *procnew)
+                          apr_proc_t *procnew)
 {
+    /* for lowportd_maint */
+    main_server_conf = main_server;
 
     daemon_should_exit = 0; /* clear setting from previous generation */
     if ((daemon_pid = fork()) < 0) {
@@ -517,7 +519,7 @@
                 else {
                     ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
                                  "lowportd daemon process died, restarting");
-                    lowportd_start(pdaemon, ap_server_conf, proc);
+                    lowportd_start(pdaemon, main_server_conf, proc);
                 }
             }
             break;
@@ -528,7 +530,7 @@
         case APR_OC_REASON_LOST:
             /* Restart the child daemon process */
             apr_proc_other_child_unregister(data);
-            lowportd_start(pdaemon, ap_server_conf, proc);
+            lowportd_start(pdaemon, main_server_conf, proc);
             break;
         case APR_OC_REASON_UNREGISTER:
             /* we get here when pdaemon is cleaned up, which is cleaned