aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-11-20 18:20:52 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-11-20 18:20:52 +0000
commit3644b17d50685b5d9bd7aeb7a7a7a3d2e0784388 (patch)
tree8f6402e002371114cba333b34b39f1f3b7b56c52 /fetchmail.c
parentc8ecb908dde9760ac2ff55f73ffd02f1a0046f59 (diff)
downloadfetchmail-3644b17d50685b5d9bd7aeb7a7a7a3d2e0784388.tar.gz
fetchmail-3644b17d50685b5d9bd7aeb7a7a7a3d2e0784388.tar.bz2
fetchmail-3644b17d50685b5d9bd7aeb7a7a7a3d2e0784388.zip
Send notification and wedge the connection on too many timeouts.
svn path=/trunk/; revision=2190
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 95848491..b36c2d83 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -377,8 +377,6 @@ int main (int argc, char **argv)
/* pick up interactively any passwords we need but don't have */
for (ctl = querylist; ctl; ctl = ctl->next)
{
- ctl->authfailcount = 0;
-
if (ctl->active && !(implicitmode && ctl->server.skip)&&!ctl->password)
{
if (ctl->server.preauthenticate == A_KERBEROS_V4 ||
@@ -505,10 +503,10 @@ int main (int argc, char **argv)
batchcount = 0;
for (ctl = querylist; ctl; ctl = ctl->next)
{
- if (ctl->authfailcount)
+ if (ctl->wedged)
{
error(0, -1,
- "poll of %s skipped until authentication is unwedged",
+ "poll of %s skipped (failed authentication or too many timeouts)",
ctl->server.pollname);
continue;
}
@@ -603,14 +601,14 @@ int main (int argc, char **argv)
* should softly and silently vanish away, rather than
* spinning uselessly.
*/
- int auth_ok = 0;
+ int unwedged = 0;
for (ctl = querylist; ctl; ctl = ctl->next)
- if (!ctl->authfailcount)
- auth_ok++;
- if (!auth_ok)
+ if (!ctl->wedged)
+ unwedged++;
+ if (!unwedged)
{
- error(0, -1, "All authentications have failed. Exiting.");
+ error(0, -1, "All connections are wedged. Exiting.");
exit(PS_AUTHFAIL);
}
@@ -896,6 +894,8 @@ static int load_params(int argc, char **argv, int optind)
/* merge in wired defaults, do sanity checks and prepare internal fields */
for (ctl = querylist; ctl; ctl = ctl->next)
{
+ ctl->wedged = FALSE;
+
if (configdump || (ctl->active && !(implicitmode && ctl->server.skip)))
{
/* merge in defaults */