Display a warning when writing to the tracelog file fails
authorMikael Berthe <mikael@lilotux.net>
Sat, 04 Oct 2008 14:55:32 +0200
changeset 1531 9f92c0edde1c
parent 1530 29c505d43b3e
child 1532 eebeb4171232
Display a warning when writing to the tracelog file fails
mcabber/src/utils.c
--- 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);
   }
 }