From 34d410dc82e05f4255ec23a9deaff212b7903955 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 11 May 2019 22:11:42 +0100 Subject: Implement authentication in the form of the bouncer having a configurable server password --- replay.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'replay.c') diff --git a/replay.c b/replay.c index 36817fb..0ab3238 100644 --- a/replay.c +++ b/replay.c @@ -166,6 +166,7 @@ int relaylines(int seconds) { int timestamp = gettimestamp(str); if (timestamp < 1) { printf("Error reading timestamp from replay log file.\n"); + fclose(fp); return -1; } @@ -221,6 +222,7 @@ int readrelayline(int seconds, int linenum, char *str) { strncpy(str, line, strlen(line)); str[strlen(line)] = '\0'; + fclose(fp); return 1; } count++; @@ -228,6 +230,7 @@ int readrelayline(int seconds, int linenum, char *str) { } // If we got here something went wrong + fclose(fp); return 0; } -- cgit v1.2.3