#include "portab.h"
-static char UNUSED id[] = "$Id: conf.c,v 1.87 2005/09/24 17:06:54 alex Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.88 2005/10/11 19:29:23 alex Exp $";
#include "imp.h"
#include <assert.h>
* Non-Server-Connections will be silently ignored. */
int i;
+ time_t t;
/* Check all our configured servers */
for( i = 0; i < MAX_SERVERS; i++ ) {
Init_Server_Struct( &Conf_Server[i] );
} else {
/* Set time for next connect attempt */
- if( Conf_Server[i].lasttry < time( NULL ) - Conf_ConnectRetry ) {
- /* Okay, the connection was established "long enough": */
- Conf_Server[i].lasttry = time( NULL ) - Conf_ConnectRetry + RECONNECT_DELAY;
- }
+ t = time(NULL);
+ if (Conf_Server[i].lasttry < t - Conf_ConnectRetry) {
+ /* The connection has been "long", so we don't
+ * require the next attempt to be delayed. */
+ Conf_Server[i].lasttry =
+ t - Conf_ConnectRetry + RECONNECT_DELAY;
+ } else
+ Conf_Server[i].lasttry = t;
}
}
} /* Conf_UnsetServer */