diff mcabber/src/utils.c @ 1531:9f92c0edde1c

Display a warning when writing to the tracelog file fails
author Mikael Berthe <mikael@lilotux.net>
date Sat, 04 Oct 2008 14:55:32 +0200
parents af54d33facd0
children e89787ee40f7
line wrap: on
line diff
--- a/mcabber/src/utils.c	Sat Oct 04 14:13:49 2008 +0200
+++ b/mcabber/src/utils.c	Sat Oct 04 14:55:32 2008 +0200
@@ -120,7 +120,8 @@
       scr_LogPrint(LPRINT_NORMAL, "ERROR: Cannot open tracelog file");
       return;
     }
-    fputs(data, fp);
+    if (fputs(data, fp) == EOF)
+      scr_LogPrint(LPRINT_NORMAL, "ERROR: Cannot write to tracelog file");
     fclose(fp);
   }
 }