]> Pileus Git - ~andy/fetchmail/commitdiff
Improved Receive parsing.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 27 Jul 1998 06:54:52 +0000 (06:54 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 27 Jul 1998 06:54:52 +0000 (06:54 -0000)
svn path=/trunk/; revision=2026

NEWS
driver.c

diff --git a/NEWS b/NEWS
index 851916940b4495ee51c9b3798e51c7a2a07e29ef..6da0aa8b0f163619fe2c7f46daf359ab89ee45c1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
                                Release Notes:
 
+fetchmail-4.5.4 ():
+* Brendan Cully's FAQ entry on GSSAPI.
+* Andrew Cagney's improvement to Received-line parsing.
+
+There are 260 people on fetchmail-friends and 251 on fetchmail-announce.
+
 fetchmail-4.5.4 (Sat Jul 25 10:25:14 EDT 1998):
 * Fixed processing of --antispam option.
 * Antispam default value is now the list [571, 550, 501] corresponding
index f009915830300a78229e50ebfe3b00b28c82e52e..6abe5c48e29cb5cc304454cd4a0f0367a0b7375c 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -284,16 +284,23 @@ static char *parse_received(struct query *ctl, char *bufp)
            (ok = strstr(sp, "for ")) && 
            isspace(ok[-1]))
        {
+           flag        want_gt = FALSE;
+
            tp = rbuf;
            sp = ok + 4;
-           *tp++ = ':';        /* Here is the hack.  This is to be friend */
+           *tp++ = ':';        /* Here is the hack.  This is to be friends */
            *tp++ = ' ';        /* with nxtaddr()... */
            if (*sp == '<')
+           {
+               want_gt = TRUE;
                sp++;
+           }
            while (*sp == '@')          /* skip routes */
                while (*sp && *sp++ != ':')
                    continue;
-           while (*sp && *sp != '>' && *sp != ';')
+            while (*sp
+                   && (want_gt ? (*sp != '>') : !isspace(*sp))
+                   && *sp != ';')
                if (!isspace(*sp))
                    *tp++ = *sp++;
                else