diff lib/ftps.c @ 847:14858879916f

2006-11-2 Brian Masney <masneyb@gftp.org> * lib/ftpcommon.h lib/ftps.c lib/rfc959.c - use the encoded filename length to determine how many bytes should be sent in the command to the remote server. Don't use the strlen() function since there may be a NUL character in the filename. ATTENTION INTERNATIONAL USERS: If you have time, can you test the filename encoding in CVS? All of the necessary changes were made to the local, FTP and SSH protocols. Let me know if you see any problems.
author masneyb
date Fri, 03 Nov 2006 03:23:19 +0000
parents 435b11d2d628
children 1808cebed602
line wrap: on
line diff
--- a/lib/ftps.c	Fri Nov 03 03:07:44 2006 +0000
+++ b/lib/ftps.c	Fri Nov 03 03:23:19 2006 +0000
@@ -60,7 +60,7 @@
 
   params = request->protocol_data;
 
-  ret = rfc959_send_command (request, "AUTH TLS\r\n", 1, 0);
+  ret = rfc959_send_command (request, "AUTH TLS\r\n", -1, 1, 0);
   if (ret < 0)
     return (ret);
   else if (ret != '2')
@@ -72,12 +72,12 @@
   request->read_function = gftp_ssl_read;
   request->write_function = gftp_ssl_write;
 
-  ret = rfc959_send_command (request, "PBSZ 0\r\n", 1, 0);
+  ret = rfc959_send_command (request, "PBSZ 0\r\n", -1, 1, 0);
   if (ret < 0)
     return (ret);
 
   ret = '5'; /* FIXME */
-  /* ret = rfc959_send_command (request, "PROT P\r\n", 1, 0); */
+  /* ret = rfc959_send_command (request, "PROT P\r\n", -1, 1, 0); */
   if (ret < 0)
     return (ret);
   else if (ret == '2')
@@ -87,7 +87,7 @@
     }
   else
     {
-      ret = rfc959_send_command (request, "PROT C\r\n", 1, 0);
+      ret = rfc959_send_command (request, "PROT C\r\n", -1, 1, 0);
       if (ret < 0)
         return (ret);
       else if (ret != '2')