From a06e308306ed41ca257eabc7e522b03cfbe1c53b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 30 Oct 1996 14:25:15 +0000 Subject: Handle multiple comma-separated local names correctly. svn path=/trunk/; revision=434 --- NEWS | 3 +++ driver.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 83f549e6..bfd3aa19 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Release Notes: +pl 1.9.6 (): +* Make rewrite option handle multiple comma-separated local names correctly. + pl 1.9.5 (Tue Oct 29 20:07:41 EST 1996): * Added -N, --nodetach option for debugging purposes. * Use interval timers for poll-interval sleep and nonresponse timeout. diff --git a/driver.c b/driver.c index eef6a72c..b0f0b5f6 100644 --- a/driver.c +++ b/driver.c @@ -117,8 +117,6 @@ const char *host; /* server hostname */ state = 5; else if (isspace(*from)) state = 2; - else if (*from == ',') - tokencount = 0; break; case 2: /* found a token boundary -- reset without copying */ @@ -185,11 +183,12 @@ const char *host; /* server hostname */ strcpy(buf, "@"); strcat(buf, host); buf += strlen(buf); + tokencount = 0; state = 1; } /* a single local name alone on the line */ - else if (*from == '\n' && tokencount == 0) + else if (*from == '\n' && tokencount == 1) { strcpy(buf, "@"); strcat(buf, host); -- cgit v1.2.3