pollita Sat Feb 21 14:38:00 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/ftp ftp.c
Log:
MFH
http://cvs.php.net/diff.php/php-src/ext/ftp/ftp.c?r1=1.68.2.13&r2=1.68.2.14&ty=u
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.68.2.13 php-src/ext/ftp/ftp.c:1.68.2.14
--- php-src/ext/ftp/ftp.c:1.68.2.13 Fri Feb 20 16:09:07 2004
+++ php-src/ext/ftp/ftp.c Sat Feb 21 14:37:59 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftp.c,v 1.68.2.13 2004/02/20 21:09:07 pollita Exp $ */
+/* $Id: ftp.c,v 1.68.2.14 2004/02/21 19:37:59 pollita Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -108,7 +108,7 @@
/* IP and port conversion box */
union ipbox {
- unsigned long l[2];
+ struct in_addr ia[2];
unsigned short s[4];
unsigned char c[8];
};
@@ -638,9 +638,8 @@
sin = (struct sockaddr_in *) sa;
sin->sin_family = AF_INET;
- memcpy(&(sin->sin_addr.s_addr), &(ipbox.c[0]), 4);
+ sin->sin_addr = ipbox.ia[0];
sin->sin_port = ipbox.s[2];
-
ftp->pasv = 2;
return 1;
@@ -1328,7 +1327,7 @@
#endif
/* send the PORT */
- memcpy(&(ipbox.c[0]), &(((struct sockaddr_in*) sa)->sin_addr.s_addr), 4);
+ ipbox.ia[0] = ((struct sockaddr_in*) sa)->sin_addr;
ipbox.s[2] = ((struct sockaddr_in*) &addr)->sin_port;
sprintf(arg, "%u,%u,%u,%u,%u,%u",
ipbox.c[0], ipbox.c[1], ipbox.c[2], ipbox.c[3],
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php