diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-04-23 17:05:26 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-04-23 17:05:26 +0000 |
commit | 96cc6df6cf184e434964ad98aa5c75e42b35e36f (patch) | |
tree | fffe81e2bde545982267f2ebe63e2b2d210617c7 /driver.c | |
parent | 43a5026bc60d669bcaa4d6a3577d8b716889a5b1 (diff) | |
download | fetchmail-96cc6df6cf184e434964ad98aa5c75e42b35e36f.tar.gz fetchmail-96cc6df6cf184e434964ad98aa5c75e42b35e36f.tar.bz2 fetchmail-96cc6df6cf184e434964ad98aa5c75e42b35e36f.zip |
Fix \rs in error-message handling for qmail.
svn path=/trunk/; revision=970
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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); } /* |