aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--fetchmail.c12
-rw-r--r--fetchmail.h2
-rw-r--r--interface.c4
4 files changed, 12 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index eae0ea54..ef617dd7 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,8 @@
* Update for cs.po from Jiri Pavlovsky.
* Prevent spurious hostname matches in fetchmailconf.
* Ultrix 4.5 port patches from Simon Burge <simonb@thistledown.com.au>.
-* Add bug warnubng to FAQ about Lotus Domino.
+* Add bug warning to FAQ about Lotus Domino.
+* Suppress monitor check just after being woken by signal.
fetchmail-5.3.4 (Wed Mar 22 15:55:51 EST 2000), 18819 lines:
diff --git a/fetchmail.c b/fetchmail.c
index 76580ca2..99547745 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -125,6 +125,7 @@ int main(int argc, char **argv)
netrc_entry *netrc_list;
char *netrc_file, *tmpbuf;
pid_t pid;
+ int lastsig = 0;
#ifdef __FreeBSD__
dropprivs();
@@ -626,8 +627,11 @@ int main(int argc, char **argv)
}
#if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__)
- /* interface_approve() does its own error logging */
- if (!interface_approve(&ctl->server))
+ /*
+ * Don't do monitoring if we were woken by a signal.
+ * Note that interface_approve() does its own error logging.
+ */
+ if (!interface_approve(&ctl->server, !lastsig))
continue;
#endif /* (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) */
@@ -703,8 +707,6 @@ int main(int argc, char **argv)
*/
if (run.poll_interval)
{
- int lastsig;
-
/*
* Because passwords can expire, it may happen that *all*
* hosts are now out of the loop due to authfail
@@ -731,7 +733,7 @@ int main(int argc, char **argv)
/*
* OK, now pause util it's time for the next poll cycle.
- * A TRUE return indicates we received a wakeup signal;
+ * A nonzero return indicates we received a wakeup signal;
* unwedge all servers in case the problem has been
* manually repaired.
*/
diff --git a/fetchmail.h b/fetchmail.h
index 605c469b..d23e9127 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -473,7 +473,7 @@ extern int UnMimeBodyline(unsigned char **buf, flag delimited, flag issoftline)
void interface_init(void);
void interface_parse(char *, struct hostdata *);
void interface_note_activity(struct hostdata *);
-int interface_approve(struct hostdata *);
+int interface_approve(struct hostdata *, flag domonitor);
/* xmalloc.c */
#if defined(HAVE_VOIDPOINTER)
diff --git a/interface.c b/interface.c
index 7a485e78..7ba922f9 100644
--- a/interface.c
+++ b/interface.c
@@ -434,7 +434,7 @@ void interface_note_activity(struct hostdata *hp)
#endif
}
-int interface_approve(struct hostdata *hp)
+int interface_approve(struct hostdata *hp, flag domonitor)
/* return TRUE if OK to poll, FALSE otherwise */
{
ifinfo_t ifinfo;
@@ -460,7 +460,7 @@ int interface_approve(struct hostdata *hp)
}
/* if not monitoring link, all done */
- if (!hp->monitor)
+ if (!domonitor || !hp->monitor)
return(TRUE);
#ifdef ACTIVITY_DEBUG