From 8047122e854ce3abca5b998a26520394fdbc24bf Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Thu, 23 Feb 2012 22:42:00 +0100 Subject: [PATCH] bugfix: fix timeout issue on Solaris (Sandor Geller) --- ChangeLog | 3 ++- configure.in | 2 +- src/fping.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c8bd95..37e8de3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ UNRELEASED David Schweikert -- Revision v3.1 ALPHA +- Revision v3.1 RC1 * -g option (generate): exclude network and broadcast address for cidr ranges (idea by Eric Brander) * do not explicitely check if running as root, to make it possible to @@ -9,6 +9,7 @@ David Schweikert * ANSI C (C89) compiler now a requirement * portability fixes * reorganized source directory + * bugfix: fix timeout issue on Solaris (Sandor Geller) Thu Dec 28 2011 David Schweikert diff --git a/configure.in b/configure.in index b4ab6e8..9f72706 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Minimum Autoconf version required. AC_PREREQ(2.59) -AC_INIT([fping],[3.0]) +AC_INIT([fping],[3.1-rc1]) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([foreign]) diff --git a/src/fping.c b/src/fping.c index 6fd8f34..562859e 100644 --- a/src/fping.c +++ b/src/fping.c @@ -2619,6 +2619,10 @@ int recvfrom_wto( int s, char *buf, int len, FPING_SOCKADDR *saddr, long timo ) to.tv_sec = 0; to.tv_usec = timo * 10; + while (to.tv_usec > 1000000) { + to.tv_sec++; + to.tv_usec -= 1000000; + } FD_ZERO( &readset ); FD_ZERO( &writeset );