[axel-commits] r72 - in /trunk: CHANGES conn.h ftp.c ftp.h

appaji at users.alioth.debian.org appaji at users.alioth.debian.org
Fri Dec 26 03:47:45 UTC 2008


Author: appaji
Date: Fri Dec 26 03:47:45 2008
New Revision: 72

URL: http://svn.debian.org/wsvn/axel/?sc=1&rev=72
Log:
Fix LFS support for FTP (Closes: #311320)

Modified:
    trunk/CHANGES
    trunk/conn.h
    trunk/ftp.c
    trunk/ftp.h

Modified: trunk/CHANGES
URL: http://svn.debian.org/wsvn/axel/trunk/CHANGES?rev=72&op=diff
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Fri Dec 26 03:47:45 2008
@@ -1,6 +1,7 @@
-Version 2.2.1:
+UNRELEASED
 
 - Wait for thread termination in axel.c:axel_do (Closes: #311255), thanks John Ripa
+- Fix LFS support for FTP (Closes: #311320)
 
 Version 2.2:
 

Modified: trunk/conn.h
URL: http://svn.debian.org/wsvn/axel/trunk/conn.h?rev=72&op=diff
==============================================================================
--- trunk/conn.h (original)
+++ trunk/conn.h Fri Dec 26 03:47:45 2008
@@ -42,9 +42,9 @@
 	
 	ftp_t ftp[1];
 	http_t http[1];
-	long long size;		/* File size, not 'connection size'..	*/
-	long long currentbyte;
-	long long lastbyte;
+	long long int size;		/* File size, not 'connection size'..	*/
+	long long int currentbyte;
+	long long int lastbyte;
 	int fd;
 	int enabled;
 	int supported;

Modified: trunk/ftp.c
URL: http://svn.debian.org/wsvn/axel/trunk/ftp.c?rev=72&op=diff
==============================================================================
--- trunk/ftp.c (original)
+++ trunk/ftp.c Fri Dec 26 03:47:45 2008
@@ -98,9 +98,9 @@
 }
 
 /* Get file size. Should work with all reasonable servers now		*/
-int ftp_size( ftp_t *conn, char *file, int maxredir )
-{
-	int i, j, size = MAX_STRING;
+long long int ftp_size( ftp_t *conn, char *file, int maxredir )
+{
+	long long int i, j, size = MAX_STRING;
 	char *reply, *s, fn[MAX_STRING];
 	
 	/* Try the SIZE command first, if possible			*/
@@ -109,7 +109,7 @@
 		ftp_command( conn, "SIZE %s", file );
 		if( ftp_wait( conn ) / 100 == 2 )
 		{
-			sscanf( conn->message, "%*i %i", &i );
+			sscanf( conn->message, "%*i %lld", &i );
 			return( i );
 		}
 		else if( conn->status / 10 != 50 )
@@ -202,10 +202,10 @@
 	else
 	{
 		s = strstr( reply, "\n-" );
-		i = sscanf( s, "%*s %*i %*s %*s %i %*s %*i %*s %100s", &size, fn );
+		i = sscanf( s, "%*s %*i %*s %*s %lld %*s %*i %*s %100s", &size, fn );
 		if( i < 2 )
 		{
-			i = sscanf( s, "%*s %*i %i %*i %*s %*i %*i %100s", &size, fn );
+			i = sscanf( s, "%*s %*i %lld %*i %*s %*i %*i %100s", &size, fn );
 			if( i < 2 )
 			{
 				return( -2 );

Modified: trunk/ftp.h
URL: http://svn.debian.org/wsvn/axel/trunk/ftp.h?rev=72&op=diff
==============================================================================
--- trunk/ftp.h (original)
+++ trunk/ftp.h Fri Dec 26 03:47:45 2008
@@ -43,4 +43,4 @@
 int ftp_command( ftp_t *conn, char *format, ... );
 int ftp_cwd( ftp_t *conn, char *cwd );
 int ftp_data( ftp_t *conn );
-int ftp_size( ftp_t *conn, char *file, int maxredir );
+long long int ftp_size( ftp_t *conn, char *file, int maxredir );




More information about the axel-commits mailing list