diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 18:52:53 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 18:52:53 +0200 |
commit | e0e7a74bde52a1aa02d1da758128722598fb6dd8 (patch) | |
tree | 3064dd064dcde0969467c6d2e068d8ccbbd648b1 /uid.c | |
parent | 5256f6122e9843b1e9988a742ed6c2a4923bc2bd (diff) | |
download | fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.tar.gz fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.tar.bz2 fetchmail-e0e7a74bde52a1aa02d1da758128722598fb6dd8.zip |
Align with legacy_6x.
* Normalize include order.
* Backport missed bug fixes.
* Remove dead code.
Diffstat (limited to 'uid.c')
-rw-r--r-- | uid.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -23,10 +23,9 @@ #include "sdump.h" /* - * Machinery for handling UID lists live here. This is mainly to support - * RFC1725/RFC1939-conformant POP3 servers without a LAST command, but may also - * be useful for making the IMAP4 querying logic UID-oriented, if a future - * revision of IMAP forces me to. + * Machinery for handling UID lists live here. This is currently used + * by POP3, but may also be useful for making the IMAP4 querying logic + * UID-oriented. * * These functions are also used by the rest of the code to maintain * string lists. @@ -121,6 +120,7 @@ static int dump_saved_uid(struct uid_db_record *rec, void *unused) return 0; } +/** Read saved IDs from \a idfile and attach to each host in \a hostlist. */ void initialize_saved_lists(struct query *hostlist, const char *idfile) { struct stat statbuf; @@ -347,7 +347,7 @@ static void dump_uid_db(struct uid_db *db) traverse_uid_db(db, dump_uid_db_record, &n_recs); } -/* finish a query */ +/** Finish a successful query */ void uid_swap_lists(struct query *ctl) { /* debugging code */ @@ -390,7 +390,7 @@ void uid_swap_lists(struct query *ctl) report(stdout, GT_("not swapping UID lists, no UIDs seen this query\n")); } -/* finish a query which had errors */ +/** Finish a query which had errors */ void uid_discard_new_list(struct query *ctl) { /* debugging code */ @@ -446,6 +446,7 @@ static int write_uid_db_record(struct uid_db_record *rec, void *arg) return rc < 0 ? -1 : 0; } +/** Write new list of UIDs (state) to \a idfile. */ void write_saved_lists(struct query *hostlist, const char *idfile) { long idcount; @@ -504,7 +505,7 @@ void write_saved_lists(struct query *hostlist, const char *idfile) bailout: (void)fflush(tmpfp); /* return code ignored, we check ferror instead */ errflg |= ferror(tmpfp); - fclose(tmpfp); + errflg |= fclose(tmpfp); /* if we could write successfully, move into place; * otherwise, drop */ if (errflg) { |