search for: stalltim

Displaying 7 results from an estimated 7 matches for "stalltim".

Did you mean: stalltime
2002 Feb 06
2
SFTP Status Bar..
..._pgrp == pgrp)); +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static size_t progressbar_size = 0; + struct timeval now, td...
2002 Jan 30
1
Quick sftp status indicator.
...dproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +void +progressmeter(int flag, off_t statbytes, off_t totalbytes, char *curfile) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static struct timeval lastupdate; + static off_t lastsize; + static u_char *progressbar = NULL; + static size_t progressbar_size = 0; + static struct timeval start; + stru...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...foregroundproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL, file = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static size_t progressbar_size = 0; + struct ti...
2002 Jul 13
0
[PATCH]: scp program improved
...strlen(buf), " %5lu %c%c ", - (unsigned long) abbrevsize, prefixes[i], - prefixes[i] == ' ' ? ' ' : 'B'); - - timersub(&now, &lastupdate, &wait); - if (cursize > lastsize) { - lastupdate = now; - lastsize = cursize; - if (wait.tv_sec >= STALLTIME) { - start.tv_sec += wait.tv_sec; - start.tv_usec += wait.tv_usec; - } - wait.tv_sec = 0; - } - timersub(&now, &start, &td); - elapsed = td.tv_sec + (td.tv_usec / 1000000.0); +void get_prefixed(off_t value, char *prefixed) +{ + static const char prefixes[] = " KMGT";...
2000 Aug 24
0
patch for a few things
...* timersub(&now, &start, &td); elapsed = td.tv_sec + (td.tv_usec / 1000000.0); if (statbytes <= 0 || elapsed <= 0.0 || cursize > totalbytes) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ! " --:-- ETA"); } else if (wait.tv_sec >= STALLTIME) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ! " - stalled -"); } else { if (flag != 1) remaining = --- 1208,1249 ---- timersub(&now, &start, &td); elapsed = td.tv_sec + (td.tv_usec / 1000000.0); + rate = cursize / elapsed; + if(bit...
2000 Jul 02
1
minor cosmetic bug
The progress metre in scp(1) breaks when the tty is too wide. This patch is the effortless fix: ########################################################################### :; diff -u openssh-2.1.1p2/scp.c openssh-2.1.1p2+jhc/scp.c --- openssh-2.1.1p2+jhc/scp.c Thu Jun 22 07:32:32 2000 +++ openssh-2.1.1p2/scp.c Sat Jul 1 22:15:36 2000 @@ -1176,8 +1176,9 @@ i = barlength *
2003 Feb 24
0
[Bug 491] Large file transfers get stalls
http://bugzilla.mindrot.org/show_bug.cgi?id=491 ------- Additional Comments From djm at mindrot.org 2003-02-24 13:06 ------- Is your link high-latency? Try increasing STALLTIME in scp.c a little. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.