Is ssh-1.2.* still supported? There is a little bug in the statistics output
of scp. It was already fixed in ssh-1.2.26 in the case of sending files but
I noticed that the same overflow exists when receiving files: after every 41
megs the percentage indicator is reset to zero.

before the overflow:

received_file             |      41620 KB | 338.4 kB/s | ETA: 00:02:07 |  49%

and after:

received_file             |      41972 KB | 338.5 kB/s | ETA: 00:02:06 |   0%


A patch:

--- scp.c.orig  Fri Mar 12 14:56:27 1999
+++ scp.c       Fri Mar 12 15:20:20 1999
@@ -1150,7 +1150,9 @@
                                                stat_eta((int)
                                                         ((size - statbytes)
                                                          / ratebs)),
-                                               100 * statbytes / size);
+                                               (int) (100.0 *
+                                                       (double) statbytes /
+                                                       size));
                                      if (all_statistics && (i + j) == size)
                                        bwritten += fprintf(SOME_STATS_FILE, "\n");
                                      stats_fixlen(bwritten);

Reply via email to