]> Pileus Git - ~andy/fetchmail/commitdiff
Make BSMTP output actually work, it would persistently fail with SOCKET error
authorMatthias Andree <matthias.andree@gmx.de>
Thu, 29 Mar 2007 22:52:16 +0000 (22:52 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Thu, 29 Mar 2007 22:52:16 +0000 (22:52 -0000)
after writing the first header.

svn path=/branches/BRANCH_6-3/; revision=5071

NEWS
sink.c

diff --git a/NEWS b/NEWS
index 1b79f5e54cb8fa1024de24a6640751978ec8b159..b31673bf51176d1fd20dc92c0302fa833969d0ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -77,6 +77,8 @@ fetchmail 6.3.8 (not yet released):
 * Do not crash with a null pointer dereference when opening the BSMTP file 
   fails. Improve error checking and reporting. Reported by Reto Schüttel,
   Debian Bug#416625. Fix based on a patch by Nico Golde.
+* Make BSMTP output actually work, it would persistently fail with SOCKET error
+  after writing the first header.
 
 # DOCUMENTATION:
 * Extend --mda documentation, discourage use of qmail-inject.
diff --git a/sink.c b/sink.c
index 22d2243a9fa972d9ef45a3819a5f5cd731a93b34..9dd9ce708839ec70246014f2f13b0acc0f6e7c55 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -686,7 +686,7 @@ int stuffline(struct query *ctl, char *buf)
 
     n = 0;
     if (ctl->mda || ctl->bsmtp) {
-       n = fwrite(buf, last - buf, 1, sinkfp);
+       n = fwrite(buf, 1, last - buf, sinkfp);
        if (ferror(sinkfp)) n = -1;
     } else if (ctl->smtp_socket != -1)
        n = SockWrite(ctl->smtp_socket, buf, last - buf);