diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-03-17 18:03:58 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-03-17 18:03:58 +0000 |
commit | 93aa31ffc1624a9bc6a985a4c5679bac2ceb5e9a (patch) | |
tree | a17a957c8dacfa6cc33e5ac187bb5a36df1261a6 | |
parent | a09d628f66a29063ef3060c1f25b1b23051a7e89 (diff) | |
download | fetchmail-93aa31ffc1624a9bc6a985a4c5679bac2ceb5e9a.tar.gz fetchmail-93aa31ffc1624a9bc6a985a4c5679bac2ceb5e9a.tar.bz2 fetchmail-93aa31ffc1624a9bc6a985a4c5679bac2ceb5e9a.zip |
Dick van den Burg's patch.
svn path=/trunk/; revision=1705
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | fetchmail.h | 1 | ||||
-rw-r--r-- | pop3.c | 4 | ||||
-rw-r--r-- | uid.c | 14 |
4 files changed, 19 insertions, 4 deletions
@@ -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); @@ -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)++; } @@ -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 */ { |