From 19ce6ae631d8f8cc913483314a2ed55214e2a60e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 25 Jan 1997 17:38:15 +0000 Subject: Yet another step. svn path=/trunk/; revision=829 --- driver.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'driver.c') 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 -- cgit v1.2.3