changeset 13513:43d123a4b4d7

[gaim-migrate @ 15889] Really compile. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 14 Mar 2006 14:43:41 +0000
parents 7608c01ebe61
children 6ad9d666e824
files src/log.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/log.c	Tue Mar 14 14:04:17 2006 +0000
+++ b/src/log.c	Tue Mar 14 14:43:41 2006 +0000
@@ -1026,6 +1026,7 @@
 {
 	char *msg_fixed;
 	char *date;
+	char *header;
 	GaimPlugin *plugin = gaim_find_prpl(gaim_account_get_protocol_id(log->account));
 	GaimLogCommonLoggerData *data = log->logger_data;
 	gsize written = 0;
@@ -1048,14 +1049,16 @@
 		written += fprintf(data->file, "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">");
 		written += fprintf(data->file, "<title>");
 		if (log->type == GAIM_LOG_SYSTEM)
-			written += fprintf(data->file, "System log for account %s (%s) connected at %s",
+			header = g_strdup_printf("System log for account %s (%s) connected at %s",
 					gaim_account_get_username(log->account), prpl, date);
 		else
-			written += fprintf(data->file, "Conversation with %s at %s on %s (%s)",
+			header = g_strdup_printf("Conversation with %s at %s on %s (%s)",
 					log->name, date, gaim_account_get_username(log->account), prpl);
 
+		written += fprintf(data->file, "%s", header);
 		written += fprintf(data->file, "</title></head><body>");
 		written += fprintf(data->file, "<h3>%s</h3>\n", header);
+		g_free(header);
 	}
 
 	/* if we can't write to the file, give up before we hurt ourselves */