aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--fetchmail.h1
-rw-r--r--pop3.c4
-rw-r--r--uid.c14
4 files changed, 19 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 8540def7..30f3ed85 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@
Release Notes:
------------------------------------------------------------------------------
-fetchmail-4.4.0 (Fri Mar 13 15:48:27 EST 1998):
+fetchmail-4.4.0 (Mon Mar 16 14:57:38 EST 1998):
* Fix bug that prevented graceful exit from POP3 validation on wrong password.
* Dominique Unruh's patch that copes gracefully with bodiless messages.
* Fix timer-leak problem with the SIGALRM fix, pointed out by Dave Bodenstab.
@@ -25,7 +25,7 @@ fetchmail-4.4.0 (Fri Mar 13 15:48:27 EST 1998):
* Handle empty Return-Path (thank Dmitry Yaitskov <dyaitskov@insystems.com>).
* Improvements in UID handling; should be a cleaner fix for Dick van den Burg.
-There are 270 people on fetchmail-friends and 160 on fetchmail-announce.
+There are 272 people on fetchmail-friends and 160 on fetchmail-announce.
fetchmail-4.3.9 (Fri Mar 6 10:45:32 EST 1998):
* Relax the LOGIN capability check in IMAP.
diff --git a/fetchmail.h b/fetchmail.h
index 76b88bff..9dda132c 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -307,6 +307,7 @@ int delete_str(struct idlist **, int);
int str_in_list(struct idlist **, const char *);
int str_nr_in_list(struct idlist **, const char *);
int str_nr_last_in_list(struct idlist **, const char *);
+void str_set_mark( struct idlist **, const char *, const flag);
int count_list( struct idlist **idl );
char *str_from_nr_list( struct idlist **idl, int number );
char *str_find(struct idlist **, int);
diff --git a/pop3.c b/pop3.c
index 1634755b..b03efdff 100644
--- a/pop3.c
+++ b/pop3.c
@@ -433,8 +433,10 @@ static int pop3_getrange(int sock,
new->val.status.num = num;
/* note: ID comparison is caseblind */
- if (str_in_list(&ctl->oldsaved, id))
+ if (str_in_list(&ctl->oldsaved, id)) {
new->val.status.mark = UID_SEEN;
+ str_set_mark(&ctl->oldsaved, id, UID_SEEN);
+ }
else
(*newp)++;
}
diff --git a/uid.c b/uid.c
index ecc6b0b4..ac49a013 100644
--- a/uid.c
+++ b/uid.c
@@ -93,7 +93,7 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile)
strcasecmp(host, ctl->server.truename) == 0
&& strcasecmp(user, ctl->remotename) == 0)
{
- save_str(&ctl->oldsaved, id, UID_SEEN);
+ save_str(&ctl->oldsaved, id, UID_UNSEEN);
break;
}
}
@@ -207,6 +207,18 @@ int str_nr_last_in_list( struct idlist **idl, const char *str)
return ret;
}
+void str_set_mark( struct idlist **idl, const char *str, const flag val)
+/* update the mark on an of an id to given value */
+{
+ int nr;
+ struct idlist *walk;
+ if (!str)
+ return;
+ for(walk = *idl, nr = 0; walk; nr ++, walk = walk->next)
+ if (strcasecmp(str, walk->id) == 0)
+ walk->val.status.mark = val;
+}
+
int count_list( struct idlist **idl)
/* count the number of elements in the list */
{