[Commits] [SCM] claws branch, master, updated. 3.17.0-102-gd968143

Colin colin at claws-mail.org
Sun Oct 7 21:31:59 CEST 2018


The branch, master has been updated
       via  d96814391e22c8c8f1c73c850cc71b3fb0a3a3e8 (commit)
      from  e745553712a30022d6d34602b4279604df0ce945 (commit)

Summary of changes:
 src/common/log.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit d96814391e22c8c8f1c73c850cc71b3fb0a3a3e8
Author: Colin Leroy <colin at colino.net>
Date:   Sun Oct 7 21:31:37 2018 +0200

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

diff --git a/src/common/log.c b/src/common/log.c
index 83b023e..344eb97 100644
--- 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]);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list