LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 007-pseudo-handling-failing-fwrite.patch of Package proxsmtp (Project home:bastianfriedrich)

--- proxsmtp-1.10.ori/common/smtppass.c	2013-03-23 21:15:20.302532306 +0100
+++ proxsmtp-1.10common/smtppass.c	2013-03-23 21:33:20.214975178 +0100
@@ -1519,7 +1519,9 @@
         sp_messagex(ctx, LOG_DEBUG, "created cache file: %s", ctx->cachename);
     }
 
-    fwrite(buf, 1, len, ctx->cachefile);
+    if (fwrite(buf, 1, len, ctx->cachefile) != len) {
+	// We handle this in the if below ...
+    }
 
     if(ferror(ctx->cachefile))
     {