changeset 299:6da95954fe41

2003-10-26 Brian Masney <masneyb@gftp.org> * lib/rfc959.c (gftp_{get,put}_next_file_chunk) - check whether or not this is an ascii file transfer properly.
author masneyb
date Mon, 27 Oct 2003 02:15:47 +0000
parents 6e0b9ca541e2
children 234944770ebd
files ChangeLog lib/rfc959.c
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 27 01:40:08 2003 +0000
+++ b/ChangeLog	Mon Oct 27 02:15:47 2003 +0000
@@ -1,4 +1,7 @@
 2003-10-26 Brian Masney <masneyb@gftp.org>
+	* lib/rfc959.c (gftp_{get,put}_next_file_chunk) - check whether or not
+	this is an ascii file transfer properly.
+
 	* lib/rfc959.c - convert the PASS command from UTF8 using 
 	gftp_convert_from_utf8()
 
@@ -1634,7 +1637,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.160 2003/10/27 01:40:06 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.161 2003/10/27 02:15:46 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/rfc959.c	Mon Oct 27 01:40:08 2003 +0000
+++ b/lib/rfc959.c	Mon Oct 27 02:15:47 2003 +0000
@@ -1338,17 +1338,17 @@
 static ssize_t
 rfc959_get_next_file_chunk (gftp_request * request, char *buf, size_t size)
 {
-  int i, j, ascii_transfers;
   rfc959_parms * parms;
   ssize_t num_read;
+  int i, j;
 
   parms = request->protocol_data;
+
   num_read = gftp_fd_read (request, buf, size, parms->data_connection);
   if (num_read < 0)
     return (num_read);
 
-  gftp_lookup_request_option (request, "ascii_transfers", &ascii_transfers);
-  if (ascii_transfers)
+  if (parms->is_ascii_transfer)
     {
       for (i = 0, j = 0; i < num_read; i++)
         {
@@ -1366,19 +1366,18 @@
 static ssize_t
 rfc959_put_next_file_chunk (gftp_request * request, char *buf, size_t size)
 {
-  int i, j, ascii_transfers;
   rfc959_parms * parms;
   ssize_t num_wrote;
   char *tempstr;
   size_t rsize;
+  int i, j;
 
   if (size == 0)
     return (0);
 
   parms = request->protocol_data;
 
-  gftp_lookup_request_option (request, "ascii_transfers", &ascii_transfers);
-  if (ascii_transfers)
+  if (parms->is_ascii_transfer)
     {
       rsize = 0;
       for (i = 0; i < size; i++)