Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
1530:29c505d43b3e | 1531:9f92c0edde1c |
---|---|
118 FILE *fp = fopen(FName, "a+"); | 118 FILE *fp = fopen(FName, "a+"); |
119 if (!fp) { | 119 if (!fp) { |
120 scr_LogPrint(LPRINT_NORMAL, "ERROR: Cannot open tracelog file"); | 120 scr_LogPrint(LPRINT_NORMAL, "ERROR: Cannot open tracelog file"); |
121 return; | 121 return; |
122 } | 122 } |
123 fputs(data, fp); | 123 if (fputs(data, fp) == EOF) |
124 scr_LogPrint(LPRINT_NORMAL, "ERROR: Cannot write to tracelog file"); | |
124 fclose(fp); | 125 fclose(fp); |
125 } | 126 } |
126 } | 127 } |
127 | 128 |
128 // checkset_perm(name, setmode) | 129 // checkset_perm(name, setmode) |