changeset 528:d32b05e07284

2004-8-9 Brian Masney <masneyb@gftp.org> * lib/sshv2.c (sshv2_setup_file_offset) - added buf argument to this function so that uploading files will work again
author masneyb
date Tue, 10 Aug 2004 02:29:09 +0000
parents d0e8f8ee3b20
children c36a475ecf5a
files ChangeLog lib/sshv2.c
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Aug 10 02:09:00 2004 +0000
+++ b/ChangeLog	Tue Aug 10 02:29:09 2004 +0000
@@ -1,4 +1,7 @@
 2004-8-9 Brian Masney <masneyb@gftp.org>
+	* lib/sshv2.c (sshv2_setup_file_offset) - added buf argument to this
+	function so that uploading files will work again
+
 	* lib/options.h src/uicommon/gftpui.c - added ability to change the
 	block size on the fly of the transfered files.
 
@@ -2719,7 +2722,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.302 2004/08/10 02:09:00 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.303 2004/08/10 02:29:09 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/sshv2.c	Tue Aug 10 02:09:00 2004 +0000
+++ b/lib/sshv2.c	Tue Aug 10 02:29:09 2004 +0000
@@ -1863,7 +1863,7 @@
 
 
 static void
-sshv2_setup_file_offset (sshv2_params * params)
+sshv2_setup_file_offset (sshv2_params * params, char *buf)
 {
   guint32 hinum, lownum;
 #ifdef G_HAVE_GINT64
@@ -1877,8 +1877,8 @@
   lownum = htonl (params->offset);
 #endif
 
-  memcpy (params->read_buffer + params->handle_len, &hinum, 4);
-  memcpy (params->read_buffer + params->handle_len + 4, &lownum, 4);
+  memcpy (buf + params->handle_len, &hinum, 4);
+  memcpy (buf + params->handle_len + 4, &lownum, 4);
 }
 
 
@@ -1907,7 +1907,7 @@
   num = htonl (params->id++);
   memcpy (params->read_buffer, &num, 4);
 
-  sshv2_setup_file_offset (params);
+  sshv2_setup_file_offset (params, params->read_buffer);
 
   num = htonl (size);
   memcpy (params->read_buffer + params->handle_len + 8, &num, 4);
@@ -1974,7 +1974,7 @@
   num = htonl (params->id++);
   memcpy (tempstr, &num, 4);
 
-  sshv2_setup_file_offset (params);
+  sshv2_setup_file_offset (params, tempstr);
  
   num = htonl (size);
   memcpy (tempstr + params->handle_len + 8, &num, 4);