aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-25 17:38:15 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-25 17:38:15 +0000
commit19ce6ae631d8f8cc913483314a2ed55214e2a60e (patch)
treef2f2d4151be05c28ef0febeb448bf53443d04f77
parent2941482b5721a2226b4ade4de98a96708baf1a80 (diff)
downloadfetchmail-19ce6ae631d8f8cc913483314a2ed55214e2a60e.tar.gz
fetchmail-19ce6ae631d8f8cc913483314a2ed55214e2a60e.tar.bz2
fetchmail-19ce6ae631d8f8cc913483314a2ed55214e2a60e.zip
Yet another step.
svn path=/trunk/; revision=829
-rw-r--r--driver.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/driver.c b/driver.c
index 069a30b0..a9509879 100644
--- a/driver.c
+++ b/driver.c
@@ -407,7 +407,7 @@ struct query *ctl; /* query control record */
char *realname; /* real name of host */
{
char buf [MSGBUFSIZE+1];
- char *bufp, *headers, *fromhdr,*tohdr,*cchdr,*bcchdr,*received_for,*envto;
+ char *headers, *fromhdr,*tohdr,*cchdr,*bcchdr,*received_for,*envto;
char *ctthdr, *line;
int n, oldlen, ch;
int sizeticker, delete_ok;
@@ -432,6 +432,8 @@ char *realname; /* real name of host */
line = (char *)NULL;
for (;;)
{
+ char *bufp;
+
if (line)
free(line);
line = xmalloc(sizeof(buf));
@@ -460,13 +462,13 @@ char *realname; /* real name of host */
}
len -= n;
- bufp = line;
- if (bufp[0] == '\r' && bufp[1] == '\n')
+ if (line[0] == '\r' && line[1] == '\n')
break; /* end of message */
if (!ctl->no_rewrite)
- reply_hack(bufp, realname);
+ reply_hack(line, realname);
+ bufp = line;
if (!headers)
{
oldlen = strlen(bufp);
@@ -832,16 +834,11 @@ char *realname; /* real name of host */
free_str_list(&xmit_names);
-#ifdef STUFFBLANK
- /* output a crlf if zero length message body */
- if (!len)
- {
- if (ctl->mda[0])
- fputs("\r\n", sinkfp);
- else if (sinkfp)
- SockWrite("\r\n", 1, 2, sinkfp);
- }
-#endif
+ /* issue the delimiter line */
+ if (ctl->mda)
+ fputs("\r\n", sinkfp);
+ else if (sinkfp)
+ SockWrite("\r\n", 1, 2, sinkfp);
/*
* Body processing starts here