aboutsummaryrefslogtreecommitdiffstats
path: root/uid.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-13 03:19:51 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-13 03:19:51 +0000
commit5dc68d27d1e979147642d4682044751f029b817c (patch)
treece7f41d3acf7c80d85aeaffeded1f7bc705de09d /uid.c
parent17cb8e0ac70fc0693211d17bf74a4fc08f57ae8c (diff)
downloadfetchmail-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.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/uid.c b/uid.c
index eb87d4dc..186d4b35 100644
--- a/uid.c
+++ b/uid.c
@@ -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)