diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-13 03:19:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-13 03:19:51 +0000 |
commit | 5dc68d27d1e979147642d4682044751f029b817c (patch) | |
tree | ce7f41d3acf7c80d85aeaffeded1f7bc705de09d /uid.c | |
parent | 17cb8e0ac70fc0693211d17bf74a4fc08f57ae8c (diff) | |
download | fetchmail-5dc68d27d1e979147642d4682044751f029b817c.tar.gz fetchmail-5dc68d27d1e979147642d4682044751f029b817c.tar.bz2 fetchmail-5dc68d27d1e979147642d4682044751f029b817c.zip |
Fixes for UIDL and Kerberos problems.
svn path=/trunk/; revision=319
Diffstat (limited to 'uid.c')
-rw-r--r-- | uid.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -140,7 +140,7 @@ int uid_in_list(idl, str) struct idlist **idl; char *str; { - if (*idl == (struct idlist *)NULL) + if (*idl == (struct idlist *)NULL || str == (char *) NULL) return(0); else if (strcmp(str, (*idl)->id) == 0) return(1); @@ -148,6 +148,19 @@ char *str; return(uid_in_list(&(*idl)->next, str)); } +char *uid_find(idl, number) +/* return the id of the given number in the given list. */ +struct idlist **idl; +int number; +{ + if (*idl == (struct idlist *) 0) + return((char *) 0); + else if (number == (*idl)->num) + return((*idl)->id); + else + return(uid_find(&(*idl)->next, number)); +} + int delete_uid(idl, num) /* delete given message from given list */ struct idlist **idl; @@ -175,6 +188,7 @@ struct hostrec *hostp; { free_uid_list(&hostp->oldsaved); hostp->oldsaved = hostp->newsaved; + hostp->newsaved = (struct idlist *) NULL; } void write_saved_lists(hostlist, idfile) |