$ git clone https://tcclient.ion.nu/tc_client.git
commit dafa3a3febdef43b3ae47df5f8f8d24958e360a3
Author: Alicia <...>
Date: Mon Aug 10 02:32:48 2015 +0200
tc_client-gtk: flush logs after every write to avoid loss of data.
diff --git a/ChangeLog b/ChangeLog
index 5719d9f..30a159e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ irchack: respond to pings while waiting for the captcha.
tc_client-gtk and camviewer: added support for captchas.
tc_client-gtk: made the pane handles between cams, chat, and userlist wide (contributed by David Kreuter)
tc_client-gtk: changed how pane handles are set to be wide to be compatible with older gtk+ versions.
+tc_client-gtk: flush logs after every write to avoid loss of data.
irchack: added support for captchas.
cursedchat: added support for captchas.
0.34:
diff --git a/utilities/gtk/logging.c b/utilities/gtk/logging.c
index 6b1a107..f8e26f9 100644
--- a/utilities/gtk/logging.c
+++ b/utilities/gtk/logging.c
@@ -65,7 +65,7 @@ void logger_write(const char* line, const char* channel, const char* nick)
while((sep=strchr(sep, '/')))
{
sep[0]=0;
-printf("Creating '%s' if it doesn't exist yet\n", filename);
+// printf("Creating '%s' if it doesn't exist yet\n", filename);
mkdir(filename, 0700);
sep[0]='/';
sep=&sep[1];
@@ -81,6 +81,7 @@ printf("Creating '%s' if it doesn't exist yet\n", filename);
fprintf(logfiles[i].f, "Opening logfile on %ti (TODO: format)\n", time(0));
}
fprintf(logfiles[i].f, "%s\n", line);
+ fflush(logfiles[i].f);
}
void logger_close_all(void)