diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-02-12 06:53:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-02-12 06:53:51 +0000 |
commit | 3884a167ae57c8429d2fd01c2aa832ae3ca4c6b8 (patch) | |
tree | 36076a677cd4809a03276eee9009c374555aaba0 /uid.c | |
parent | 6a394b3b9eff4b260b97bd9d044cbb86bab0e7d4 (diff) | |
download | fetchmail-3884a167ae57c8429d2fd01c2aa832ae3ca4c6b8.tar.gz fetchmail-3884a167ae57c8429d2fd01c2aa832ae3ca4c6b8.tar.bz2 fetchmail-3884a167ae57c8429d2fd01c2aa832ae3ca4c6b8.zip |
Added a TODO list.
svn path=/trunk/; revision=2743
Diffstat (limited to 'uid.c')
-rw-r--r-- | uid.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -124,12 +124,26 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile) /* first, skip leading spaces */ user = buf + strspn(buf, " \t"); - /* First, we split the buf into a userhost part and an id part */ - if ((id = strchr(user, '<')) != NULL ) /* set pointer to id */ + /* + * First, we split the buf into a userhost part and an id + * part ... but id doesn't necessarily start with a '<', + * espescially if the POP server returns an X-UIDL header + * instead of a Message-ID, as GMX's (www.gmx.net) POP3 + * StreamProxy V1.0 does. + */ + if ((id = strchr(user, ' ')) != NULL ) { for (delimp1 = id; delimp1 >= user; delimp1--) if ((*delimp1 != ' ') && (*delimp1 != '\t')) break; + + /* + * It should be safe to assume that id starts after + * the " " - after all, we're writing the " " + * ourselves in write_saved_lists() :-) + */ + id = id + strspn(id, " "); + delimp1++; /* but what if there is only white space ?!? */ saveddelim1 = *delimp1; /* save char after token */ *delimp1 = '\0'; /* delimit token with \0 */ |