]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
Added -convertargs switch to repl(1), to pass arguments to programs
[nmh] / mts / smtp / smtp.c
index 58ca023caa2c873529c115f5bb53c74b720bac7b..873e0cd8d5c59400fb46b15f8b929fed4ab2a4b5 100644 (file)
@@ -1272,7 +1272,9 @@ sm_fwrite(char *buffer, int len)
            }
        } else
 #endif /* TLS_SUPPORT */
-       fwrite(buffer, sizeof(*buffer), len, sm_wfp);
+       if ((int) fwrite(buffer, sizeof(*buffer), len, sm_wfp) < len) {
+           advise ("sm_fwrite", "fwrite");
+       }
 #ifdef CYRUS_SASL
     } else {
        while (len >= maxoutbuf - sasl_outbuflen) {
@@ -1288,7 +1290,10 @@ sm_fwrite(char *buffer, int len)
                return NOTOK;
            }
 
-           fwrite(output, sizeof(*output), outputlen, sm_wfp);
+           if (fwrite(output, sizeof(*output), outputlen, sm_wfp) <
+               outputlen) {
+               advise ("sm_fwrite", "fwrite");
+           }
        }
 
        if (len > 0) {
@@ -1435,7 +1440,9 @@ sm_fflush(void)
            return;
        }
 
-       fwrite(output, sizeof(*output), outputlen, sm_wfp);
+       if (fwrite(output, sizeof(*output), outputlen, sm_wfp) < outputlen) {
+           advise ("sm_fflush", "fwrite");
+       }
        sasl_outbuflen = 0;
     }
 #endif /* CYRUS_SASL */