summaryrefslogtreecommitdiff
path: root/parsing.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-11-24 20:14:54 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-11-24 20:14:54 +0100
commitaf19cbb098d6c8c1bea311b628ccb5f1ce897828 (patch)
treefc71001f4c1cc6aea623a04580c32785e3e9d916 /parsing.c
parent58c8a81222b9f4ad96255f94d2173dd17112d804 (diff)
Store last active time.
Diffstat (limited to 'parsing.c')
-rw-r--r--parsing.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/parsing.c b/parsing.c
index c2e9f23..c57a242 100644
--- a/parsing.c
+++ b/parsing.c
@@ -370,15 +370,18 @@ void process() {
} else
printf("\tParsing %s\n", file->path);
- long pos = pg_channel_file_get(channel_id, file);
+ long pos;
+ time_t time;
+ pg_channel_file_get(channel_id, file, &pos, &time);
fseek(f, pos, SEEK_SET);
+ localtime_r(&time, &now_global);
last_user = NULL;
in_monolog = monolog_len = 0;
process_file(f, channel, rs);
- pg_channel_file_set(channel_id, file, ftell(f));
+ pg_channel_file_set(channel_id, file, ftell(f), mktime(&now_global));
fclose(f);
file = file->next;