From c5662cb879864fe742bf611e9e699a08ef635dc6 Mon Sep 17 00:00:00 2001 From: Radim Kolar <> Date: Mon, 18 Oct 2010 12:35:26 +0200 Subject: [PATCH] Work correctly with FSP_TIMEOUT set to 0 --- ChangeLog | 1 + client/util.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f037525..51a3eb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Version NEXT fhostcmd: Fixed output of FSP_TRACE variable for Bourne style shells correctly intialize to zero client packet sent statistic counter note default timeout values in fsp_env man page + setting environment value FSP_TIMEOUT to <=0 uses 4byte maxint value Version 2.8.1b26 - 1 Oct 2009 fver now reports if server can process extra data in input packets. diff --git a/client/util.c b/client/util.c index 8b087f4..1930b08 100644 --- a/client/util.c +++ b/client/util.c @@ -490,7 +490,8 @@ static void util_get_env (void) if(!(env_local_dir = getenv("FSP_LOCAL_DIR"))) env_local_dir="."; if(!(p = getenv("FSP_TIMEOUT"))) env_timeout = DEFAULT_TIMEOUT; - else env_timeout = atol(p); + else env_timeout = atoi(p); + if ( env_timeout <= 0 ) env_timeout = 0x7fffffff; }