comparison lib/sshv2.c @ 519:c3edcd3e9db9

2004-7-27 Brian Masney <masneyb@gftp.org> * lib/sshv2.c - fixed SSHV2 transfers so that they work again (they were busted in the last CVS commit due to the wrong file offset being sent over) * src/gtk/misc-gtk.c - fix for the log window so that the contents are properly shown. (this was busted in the last CVS commit)
author masneyb
date Wed, 28 Jul 2004 01:58:28 +0000
parents c6a6e908dbaf
children e67a52327b24
comparison
equal deleted inserted replaced
518:c6a6e908dbaf 519:c3edcd3e9db9
1841 1841
1842 1842
1843 #ifdef G_HAVE_GINT64 1843 #ifdef G_HAVE_GINT64
1844 1844
1845 static gint64 1845 static gint64
1846 hton64 (gint64 val) 1846 sshv2_hton64 (gint64 val)
1847 { 1847 {
1848 if (G_BYTE_ORDER != G_BIG_ENDIAN) 1848 #if G_BYTE_ORDER != G_BIG_ENDIAN
1849 return (GINT64_TO_BE (val)); 1849 return (GINT64_TO_BE (val));
1850 else 1850 #else
1851 return (val); 1851 return (val);
1852 #endif
1852 } 1853 }
1853 1854
1854 #endif 1855 #endif
1855 1856
1856 1857
1859 { 1860 {
1860 guint32 hinum, lownum; 1861 guint32 hinum, lownum;
1861 #ifdef G_HAVE_GINT64 1862 #ifdef G_HAVE_GINT64
1862 gint64 offset; 1863 gint64 offset;
1863 1864
1864 offset = hton64 (params->offset); 1865 offset = sshv2_hton64 (params->offset);
1865 lownum = offset & 0xffffffff; 1866 lownum = offset >> 32;
1866 hinum = offset >> 32; 1867 hinum = (guint32) offset;
1867 #else 1868 #else
1868 hinum = 0; 1869 hinum = 0;
1869 lownum = htonl (params->offset); 1870 lownum = htonl (params->offset);
1870 #endif 1871 #endif
1871 1872