talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit fcc32c9f4370cf74ba7059668a4c18c7865996ff
parent 429ab1b06c0215cc94ea299cdaa5abcdb7e46b27
Author: Colin Leroy <colin@colino.net>
Date:   Sun,  7 Oct 2018 21:31:37 +0200

Fix hang on IMAP - the log file is accessed by multiple threads

Diffstat:
Msrc/common/log.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/common/log.c b/src/common/log.c @@ -36,12 +36,12 @@ #include "hooks.h" #include "file-utils.h" -#define FWRITE(_b,_s,_n,_f) if (claws_fwrite(_b,_s,_n,_f) != _n) { \ - g_message("log claws_fwrite failed!\n"); \ +#define FWRITE(_b,_s,_n,_f) if (fwrite(_b,_s,_n,_f) != _n) { \ + g_message("log fwrite failed!\n"); \ return; \ } -#define FPUTS(_b,_f) if (claws_fputs(_b,_f) == EOF) { \ - g_message("log claws_fputs failed!\n"); \ +#define FPUTS(_b,_f) if (fputs(_b,_f) == EOF) { \ + g_message("log fputs failed!\n"); \ return; \ } #define FFLUSH(_f) if (fflush(_f) != 0) { \ @@ -121,9 +121,9 @@ void set_log_file(LogInstance instance, const gchar *filename) g_free(backupname); } - log_fp[instance] = claws_fopen(fullname, "wb"); + log_fp[instance] = fopen(fullname, "wb"); if (!log_fp[instance]) { - FILE_OP_ERROR(fullname, "claws_fopen"); + FILE_OP_ERROR(fullname, "fopen"); log_filename[instance] = NULL; g_free(fullname); return; @@ -136,7 +136,7 @@ void set_log_file(LogInstance instance, const gchar *filename) void close_log_file(LogInstance instance) { if (log_fp[instance]) { - claws_safe_fclose(log_fp[instance]); + fclose(log_fp[instance]); log_fp[instance] = NULL; log_size[instance] = 0; g_free(log_filename[instance]);