commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-100-g02389


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-100-g02389aa
Date: Fri, 25 May 2012 23:55:55 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  02389aa8517089cac8a9635dfe52bcfc96cb75eb (commit)
      from  15320ebe213fc558691878f26eb2f2a655f2e948 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=02389aa8517089cac8a9635dfe52bcfc96cb75eb


commit 02389aa8517089cac8a9635dfe52bcfc96cb75eb
Author: Mats Erik Andersson <address@hidden>
Date:   Sat May 26 01:43:00 2012 +0200

    ftp: Large file's accounting.

diff --git a/ChangeLog b/ChangeLog
index 1dbbe4f..93b8a5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-05-26  Mats Erik Andersson  <address@hidden>
+
+       ftp: Reporting and accounting of large files.
+
+       * ftp/extern.h (ptransfer): New signature
+       `(char *, long long, struct timeval *, struct timeval *)'.
+       * ftp/ftp.c (sendrequest, recvrequest): New type `long long'
+       for BYTES and LOCAL_HASHBYTES.
+       (ptransfer): New type `long long' for BS.  New format string
+       `%lld' for byte counter and byte rate.
+
 2012-05-24  Mats Erik Andersson  <address@hidden>
 
        Portability to FreeBSD.
diff --git a/ftp/extern.h b/ftp/extern.h
index c10e18d..9117eb8 100644
--- a/ftp/extern.h
+++ b/ftp/extern.h
@@ -104,7 +104,7 @@ void proxabort (int sig);
 void proxtrans (char *, char *, char *);
 void psabort (int sig);
 void pswitch (int);
-void ptransfer (char *, long, struct timeval *, struct timeval *);
+void ptransfer (char *, long long, struct timeval *, struct timeval *);
 void put (int, char **);
 void pwd (int, char **);
 void quit (int, char **);
diff --git a/ftp/ftp.c b/ftp/ftp.c
index 48c21ba..b662259 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -541,7 +541,7 @@ sendrequest (char *cmd, char *local, char *remote, int 
printnames)
   FILE *fin, *dout = 0, *popen (const char *, const char *);
   int (*closefunc) (FILE *);
   sighandler_t oldintr, oldintp;
-  long bytes = 0, local_hashbytes = hashbytes;
+  long long bytes = 0, local_hashbytes = hashbytes;
   char *lmode, buf[BUFSIZ], *bufp;
 
   if (verbose && printnames)
@@ -826,7 +826,7 @@ recvrequest (char *cmd, char *local, char *remote, char 
*lmode, int printnames)
   int c, d, is_retr, tcrflag, bare_lfs = 0, blksize;
   static int bufsize = 0;
   static char *buf;
-  long bytes = 0, local_hashbytes = hashbytes;
+  long long bytes = 0, local_hashbytes = hashbytes;
   struct timeval start, stop;
 
   is_retr = strcmp (cmd, "RETR") == 0;
@@ -1483,11 +1483,12 @@ dataconn (char *lmode)
 }
 
 void
-ptransfer (char *direction, long int bytes, struct timeval *t0, struct timeval 
*t1)
+ptransfer (char *direction, long long int bytes,
+          struct timeval *t0, struct timeval *t1)
 {
   struct timeval td;
   float s;
-  long bs;
+  long long bs;
 
   if (verbose)
     {
@@ -1495,7 +1496,7 @@ ptransfer (char *direction, long int bytes, struct 
timeval *t0, struct timeval *
       s = td.tv_sec + (td.tv_usec / 1000000.);
 #define nz(x)  ((x) == 0 ? 1 : (x))
       bs = bytes / nz (s);
-      printf ("%ld bytes %s in %.3g seconds (%ld bytes/s)\n",
+      printf ("%lld bytes %s in %.3g seconds (%lld bytes/s)\n",
              bytes, direction, s, bs);
     }
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |   11 +++++++++++
 ftp/extern.h |    2 +-
 ftp/ftp.c    |   11 ++++++-----
 3 files changed, 18 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]