log: Fix writing timestamp to old style log .idx file

Wed, 24 Oct 2018 17:07:39 -0500

author
Mike Ruprecht <cmaiku@gmail.com>
date
Wed, 24 Oct 2018 17:07:39 -0500
changeset 39289
af9c7037d7c2
parent 39242
18ebcff52a51
child 39290
d0221dac38bd

log: Fix writing timestamp to old style log .idx file

This patch fixes writing the log timestamp to the old log format
.idx file. It was trying to write the pointer to a GDateTime format
instead of a Unix timestamp.

libpurple/log.c file | annotate | diff | comparison | revisions
--- a/libpurple/log.c	Fri Oct 12 01:42:09 2018 +0000
+++ b/libpurple/log.c	Wed Oct 24 17:07:39 2018 -0500
@@ -1689,7 +1689,7 @@
 					list = g_list_prepend(list, log);
 
 					if (index != NULL)
-						fprintf(index, "%d\t%d\t%lu\n", data->offset, data->length, (unsigned long)log->time);
+						fprintf(index, "%d\t%d\t%lu\n", data->offset, data->length, (unsigned long)g_date_time_to_unix(log->time));
 				}
 			}
 

mercurial