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 2014/10/02 19:33:46 UTC

svn commit: r1629028 - in /httpd/mod_ftp/trunk/modules/ftp: ftp_commands.c ftp_data_connection.c ftp_limitlogin.c ftp_message.c

Author: wrowe
Date: Thu Oct  2 17:33:46 2014
New Revision: 1629028

URL: http://svn.apache.org/r1629028
Log:
A workaround for client_ip in 2.4 compatibility

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_message.c

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=1629028&r1=1629027&r2=1629028&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Thu Oct  2 17:33:46 2014
@@ -32,6 +32,11 @@
 #include <limits.h>
 #endif
 
+/* In httpd 2.4, remote_ip became client_ip in the conn_rec */
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+#define remote_ip client_ip
+#endif
+
 /* Wish APR had one of these */
 #if defined(WIN32) || defined(USE_WINSOCK)
 #define FTP_APR_EADDRINUSE (APR_OS_START_SYSERR + WSAEADDRINUSE)

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c?rev=1629028&r1=1629027&r2=1629028&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c Thu Oct  2 17:33:46 2014
@@ -31,6 +31,11 @@
 #include <netinet/ip.h>
 #endif
 
+/* In httpd 2.4, remote_ip became client_ip in the conn_rec */
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+#define remote_ip client_ip
+#endif
+
 /*
  * ftp_reset_dataconn: Close any data channel listen/connect socket and
  *                     clear all data channel state from ftp_connection

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=1629028&r1=1629027&r2=1629028&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_limitlogin.c Thu Oct  2 17:33:46 2014
@@ -29,6 +29,11 @@
 #include "unixd.h"
 #endif
 
+/* In httpd 2.4, remote_ip became client_ip in the conn_rec */
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+#define remote_ip client_ip
+#endif
+
 #define FTP_SERVER_LIMIT_KEY "FireballXL5OnDVD"
 #define FTP_DB_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
 

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_message.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_message.c?rev=1629028&r1=1629027&r2=1629028&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_message.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_message.c Thu Oct  2 17:33:46 2014
@@ -23,6 +23,12 @@
 #include "mod_ftp.h"
 #include "ftp_internal.h"
 
+/* In httpd 2.4, remote_ip became client_ip in the conn_rec */
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+#define remote_ip client_ip
+#define remote_addr client_addr
+#endif
+
 /* ftp_message_generate: Function to transform meta-characters
  *
  * Arguments: fc - The ftp connection