Displaying 16 results from an estimated 16 matches for "timersub".
2002 Feb 06
2
SFTP Status Bar..
...evsize >= 100000 && i < sizeof(prefixes)) {
+ i++;
+ abbrevsize >>= 10;
+ }
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5llu %c%c ",
+ (unsigned long 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);
+ el...
2002 Jul 13
0
[PATCH]: scp program improved
...(i + amt > stb.st_size)
amt = stb.st_size - i;
@@ -572,6 +652,26 @@
if (result != amt)
haderr = result >= 0 ? EIO : errno;
}
+
+ if (rate_limit) {
+ if (bcounter >= rate_limit / 2) {
+ (void) gettimeofday(&now, (struct timezone *) 0);
+ timersub(&now, &lastupdate, &wait);
+
+ sleep_time = ((double)(bcounter / (rate_limit
+ * (double)(wait.tv_usec / 1000000.0)) - 0)
+ * (double)wait.tv_usec);
+ if (sleep_time < 0)
+ sleep_time = 0;
+
+ usleep(sleep_time);
+ (void) gettimeofday(...
2002 Jan 30
1
Quick sftp status indicator.
...evsize >= 100000 && i < sizeof(prefixes)) {
+ i++;
+ abbrevsize >>= 10;
+ }
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5llu %c%c ",
+ (unsigned long 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);
+ elaps...
1999 Dec 21
0
Problem with UTMP recording
...For SHUT_XXXX */
#ifdef HAVE_PATHS_H
# include <paths.h> /* For _PATH_XXX */
#endif
#ifdef HAVE_UTMP_H
# include <utmp.h> /* For _PATH_XXX */
#endif
#ifdef HAVE_UTMPX_H
# include <utmpx.h> /* For _PATH_XXX */
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> /* For timersub */
#endif
#ifdef HAVE_MAILLOCK_H
#include <maillock.h>
#endif
#ifndef SHUT_RDWR
enum
{
SHUT_RD = 0, /* No more receptions. */
SHUT_WR, /* No more transmissions. */
SHUT_RDWR /* No more receptions or transmissions. */
};
# define SHUT_RD SHUT_RD
# define SHUT_WR SHUT_WR
# d...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...evsize >= 100000 && i < sizeof(prefixes)) {
+ i++;
+ abbrevsize >>= 10;
+ }
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5llu %c%c ",
+ (unsigned long 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);
+ el...
2004 Feb 18
0
[PATCH] fix tftp verbose mesage
...m octet -v localhost -c get aaa /tmp/aaa
Connected to localhost.localdomain (127.0.0.1), port 69
getting from localhost.localdomain:aaa to /tmp/aaa [octet]
Received 33554432 bytes in -3.3 seconds [-81407477 bit/s]
^^^^ ^^^^^^^^^
By the way, why don't you use timersub() or something like it?
--- tftp-hpa-0.36.org/tftp/tftp.c 2004-01-09 05:47:00.000000000 +0900
+++ tftp-hpa-0.36/tftp/tftp.c 2004-02-18 22:17:27.000000000 +0900
@@ -422,8 +422,8 @@
{
double delta;
- delta = (tstop.tv_sec+(tstop.tv_usec/100000.0)) -
- (tstart.tv_sec+(tstart.tv_usec/100000.0))...
1999 Nov 22
0
ANNOUNCE: 1.2pre14
...skpass (Debian bug #50299)
- OpenBSD CVS Changes
- [ssh-keygen.c]
don't create ~/.ssh only if the user wants to store the private
key there. show fingerprint instead of public-key after
keygeneration. ok niels@
- Added OpenBSD bsd-strlcat.c, created bsd-strlcat.h
- Added timersub() macro
- Tidy RCSIDs of bsd-*.c
- Added autoconf test and macro to deal with old PAM libraries
pam_strerror definition (one arg vs two).
- Fix EGD problems (Thanks to Ben Taylor <bent at clark.net>)
- Retry /dev/urandom reads interrupted by signal (report from
Robert Hardy <rh...
1999 Nov 21
1
openssh 1.2pre13 on Linux/i386 RH4.2 problems
...ction `progressmeter':
scp.c:1177: `quad_t' undeclared (first use this function)
scp.c:1177: (Each undeclared identifier is reported only once
scp.c:1177: for each function it appears in.)
scp.c:1177: parse error before `abbrevsize'
scp.c:1180: warning: implicit declaration of function `timersub'
Now, I am probably going to upgrade this box (for other reasons), but I
do wonder if anyone else has similar problems, and if anyone is
interested in fixes.
--
Kind regards,
Berend
-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
2003 Apr 08
2
OpenSSH 3.6.1p1 on NCR MP-RAS v4.3, several weird terminal problems
...3.6.1p1/includes.h openssh-3.6.1p1-customized/includes.h
*** openssh-3.6.1p1/includes.h Sun Oct 20 20:50:26 2002
--- openssh-3.6.1p1-customized/includes.h Mon Apr 7 17:32:04 2003
***************
*** 104,110 ****
--- 104,114 ----
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> /* For timersub */
#endif
+ #define _XOPEN_SOURCE
+ #define _XOPEN_SOURCE_EXTENDED 1
#include <sys/resource.h>
+ #undef _XOPEN_SOURCE_EXTENDED
+ #undef _XOPEN_SOURCE
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
Other than that, things *appeared* to compile and install fine.
Then...
2003 Jan 25
1
Build failures: nanosleep on Solaris and AIX 4.2.x
...=======
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/includes.h,v
retrieving revision 1.61
diff -u -r1.61 includes.h
--- includes.h 21 Oct 2002 00:50:26 -0000 1.61
+++ includes.h 25 Jan 2003 07:18:36 -0000
@@ -104,6 +104,9 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> /* For timersub */
#endif
+#ifdef HAVE_SYS_TIMERS_H
+# include <sys/timers.h> /* For struct timespec on AIX 4.2.x */
+#endif
#include <sys/resource.h>
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
Index: openbsd-compat/port-aix.h
===========================================================...
1999 Dec 14
2
1.2pre17 scp Input/Output error
Under OpenSSH 1.2pre17 I can duplicate and Input/Output error for scp:
Conditions:
pc36 is a RH6.0/i386 box.
abc.co.za is a RH5.2/i386 box. (private network)
openssh 1.2 pre 17 on both boxes.
Line between them is a 128k leased line. It works between two 10baseT
machines.
If the scrollbar is active, the scp fails, if it isn't active, scp
works. Note that without the scrollbar, the file gets
2000 Aug 24
0
patch for a few things
...ratio = 100;
+ snprintf(buf, sizeof(buf), "\r%-18.18s %3d%% ", curfile, ratio);
! barlength = getttywidth() - 58;
barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH;
if (barlength > 0) {
i = barlength * ratio / 100;
***************
*** 1181,1192 ****
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) {...
1999 Nov 19
4
ANNOUNCE: openssh-1.2pre13
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have just uploaded 1.2pre13 to http://violet.ibs.com.au/openssh/
Imporant changes:
- - Fixes a single-byte buffer overrun in the PAM code.
- - Quite a bit more Solaris support. EGD should work now (please test).
- - Lots more autoconf options to enable Kerberos, AFS, TCP Wrappers and
S/Key (all untested).
- - MD5 passwords for Slackware Linux
1999 Nov 23
2
Fixes for Solaris
...pes.h> /* For u_intXX_t */
+#include <sys/socket.h> /* For SHUT_XXXX */
#ifdef HAVE_PATHS_H
# include <paths.h> /* For _PATH_XXX */
#endif
+#ifdef HAVE_UTMP_H
+# include <utmp.h> /* For _PATH_XXX */
+#endif
+
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> /* For timersub */
#endif
+#ifdef HAVE_MAILLOCK_H
+#include <maillock.h>
+#endif
+
#ifndef SHUT_RDWR
enum
{
@@ -174,6 +182,10 @@
#ifndef _PATH_STDPATH
# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:"
+#endif
+
+#ifndef _PATH_DEVNULL
+# define _PATH_DEVNULL "/dev/null"
#e...
2009 Apr 26
4
1.6.1: menuselect has problems with x86_64 ??
1.6.1 svn 190575:
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect
CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory
`/home/asterisk/rpmbuild/BUILD/asterisk-1.6.1/menuselect'
gcc -m64 -march=native -mtune=native -floop-interchange
-floop-strip-mine -floop-block -c -o
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with
updates coming from blktap2.5.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>