RSSyl: Allow use of .netrc by libcurl. Bug/enhancement #3309, by Vincent Pelletier
[claws.git] / src / plugins / spamassassin / libspamc.c
index dca8cda74054c345b79c658e3b7df7896662d9d3..e78fd0081bc951f5b4aef0ea55ea186bb811f1dd 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "config.h"
+#include "claws-features.h"
 #include "libspamc.h"
 #include "utils.h"
 
@@ -1309,8 +1310,8 @@ libspamc_log (int flags, int level, char *msg, ...)
 
         len += snprintf(buf+len, LOG_BUFSIZ-len, "\n");
         buf[LOG_BUFSIZ] = '\0';     /* ensure termination */
-        (void) write (2, buf, len);
-
+        if (write (2, buf, len) != len)
+               goto out;
     } else {
         vsnprintf(buf, LOG_BUFSIZ, msg, ap);
         buf[LOG_BUFSIZ] = '\0';     /* ensure termination */
@@ -1321,7 +1322,7 @@ libspamc_log (int flags, int level, char *msg, ...)
         g_printerr ("%s\n", buf);
 #endif
     }
-
+out:
     va_end(ap);
 }