httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r599621 - /httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
Date Thu, 29 Nov 2007 23:15:30 GMT
Author: wrowe
Date: Thu Nov 29 15:15:24 2007
New Revision: 599621

URL: http://svn.apache.org/viewvc?rev=599621&view=rev
Log:
for the sa.sin.sin_port we need network byte order, too bad we are
missing accessors to make our lives easy.


Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.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=599621&r1=599620&r2=599621&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Thu Nov 29 15:15:24 2007
@@ -1425,7 +1425,8 @@
     while (1)
     {
         /* Magic here when port == 0, accepts an ephemeral port assignment */
-        sa->port = sa->sa.sin.sin_port = port;
+        sa->port = port;
+        sa->sa.sin.sin_port = htons(port);
         rv = apr_socket_bind(s, sa);
         if (rv == APR_SUCCESS) {
             break;



Mime
View raw message