summaryrefslogtreecommitdiff
path: root/functions.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-07-10 19:09:59 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-07-10 19:09:59 +0100
commit22a4f361329ed4e303e2f1bdce9edf49e70970f3 (patch)
treeab666c6d15d0a380ee1a8395f0c1dc17e19bf719 /functions.c
parentf5778572b16fd7c5fa7f61166e05d3db1831069a (diff)
Make setting configuration option "replayseconds" optional if "replaymode" != "time".
Diffstat (limited to 'functions.c')
-rw-r--r--functions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions.c b/functions.c
index a67776f..8bbc213 100644
--- a/functions.c
+++ b/functions.c
@@ -1104,7 +1104,8 @@ int rehash(struct settings *settings, char *failuremsg) {
// How many seconds of replay log should automatically be replayed - TODO - Can we do error checking on this?
int oldreplayseconds = settings->replayseconds;
settings->replayseconds = getconfint("replayseconds", settings->conffile);
- if (errno == ECONFINT) {
+ // Don't worry if replaymode != "time"
+ if (errno == ECONFINT && strcmp(settings->replaymode, "time") == 0) {
settings->replayseconds = oldreplayseconds;
strcpy(failuremsg, "error getting 'replayseconds' from configuration file");
return 0;