diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-11 22:11:42 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-11 22:11:42 +0100 |
commit | 34d410dc82e05f4255ec23a9deaff212b7903955 (patch) | |
tree | 75f70464ca07411c85f79263af5cd55867ad9993 /replay.c | |
parent | 231656bf59da65036b171ce5ccc06eeadd64a05a (diff) |
Implement authentication in the form of the bouncer having a configurable server password
Diffstat (limited to 'replay.c')
-rw-r--r-- | replay.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } |