From 96cc6df6cf184e434964ad98aa5c75e42b35e36f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 23 Apr 1997 17:05:26 +0000 Subject: Fix \rs in error-message handling for qmail. svn path=/trunk/; revision=970 --- driver.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'driver.c') diff --git a/driver.c b/driver.c index 701224f0..6d308314 100644 --- a/driver.c +++ b/driver.c @@ -963,7 +963,10 @@ char *realname; /* real name of host */ } } - strcat(errmsg, "\n"); + if (ctl->mda && !ctl->forcecr) + strcat(errmsg, "\n"); + else + strcat(errmsg, "\r\n"); /* we may need to strip carriage returns */ if (ctl->stripcr) @@ -980,9 +983,9 @@ char *realname; /* real name of host */ if (sinkfp) { if (ctl->mda) - fwrite(errmsg, 1, strlen(errmsg), sinkfp); + fwrite(errmsg, sizeof(char), strlen(errmsg), sinkfp); else - SockWrite(errmsg, 1, strlen(errmsg), sinkfp); + SockWrite(errmsg, sizeof(char), strlen(errmsg), sinkfp); } } @@ -993,8 +996,10 @@ char *realname; /* real name of host */ { if (ctl->mda) fputc('\n', sinkfp); + else if (ctl->stripcr) + SockWrite("\n", sizeof(char), 1, sinkfp); else - SockWrite("\r\n", 1, 2, sinkfp); + SockWrite("\r\n", sizeof(char), 2, sinkfp); } /* -- cgit v1.2.3