summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2021-07-26 19:48:55 +0100
committerAlastair Poole <netstar@gmail.com>2021-07-26 19:48:55 +0100
commit1d8c09b9aaa4fa6b3c3444bb64ac1b018ae7e36a (patch)
treed9aa18dbfd78c79e6944096d4f3bf5c801e74dc1
parent1d888c9d61e2a0ab51244228b90ce3c06bfd9385 (diff)
log: append not truncate...
mehhhh...not sure
-rw-r--r--src/bin/client/client.c1
-rw-r--r--src/bin/log.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/client/client.c b/src/bin/client/client.c
index 8912a67..3a90a15 100644
--- a/src/bin/client/client.c
+++ b/src/bin/client/client.c
@@ -1112,6 +1112,7 @@ static void
1112event_last_record(Client *client) 1112event_last_record(Client *client)
1113{ 1113{
1114 client->snapshot.last_record = 1; 1114 client->snapshot.last_record = 1;
1115 free_snapshot(&client->snapshot);
1115} 1116}
1116 1117
1117static void 1118static void
diff --git a/src/bin/log.c b/src/bin/log.c
index ec435b5..8348327 100644
--- a/src/bin/log.c
+++ b/src/bin/log.c
@@ -252,7 +252,7 @@ log_open(Server *server)
252 server->log.file = file = calloc(1, sizeof(Log)); 252 server->log.file = file = calloc(1, sizeof(Log));
253 if (!file) return NULL; 253 if (!file) return NULL;
254 254
255 flags = O_CREAT | O_WRONLY | O_TRUNC; 255 flags = O_CREAT | O_WRONLY | O_APPEND;
256 fd = open(server->log.path, flags, 0600); 256 fd = open(server->log.path, flags, 0600);
257 if (fd == -1) 257 if (fd == -1)
258 { 258 {