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/11/30 00:15:30 UTC

svn commit: r599621 - /httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c

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;