summaryrefslogtreecommitdiff
path: root/replay.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-11 22:11:42 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-11 22:11:42 +0100
commit34d410dc82e05f4255ec23a9deaff212b7903955 (patch)
tree75f70464ca07411c85f79263af5cd55867ad9993 /replay.c
parent231656bf59da65036b171ce5ccc06eeadd64a05a (diff)
Implement authentication in the form of the bouncer having a configurable server password
Diffstat (limited to 'replay.c')
-rw-r--r--replay.c3
1 files changed, 3 insertions, 0 deletions
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;
}