From 7f263dceb7aee6c8d43313ac954d279868be3661 Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 15 Jan 2021 08:30:56 -0500 Subject: [PATCH] Fix inverted cfgOption*() calls. These currently work because repoIdx is always 0. --- src/config/config.c | 2 +- src/storage/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/config.c b/src/config/config.c index ef3fd43b6..8c48cb194 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -631,7 +631,7 @@ cfgOptionIdxHostPort(ConfigOption optionId, unsigned int optionIdx, unsigned int String *result = NULL; // Proceed if option is valid and has a value - if (cfgOptionTest(optionId)) + if (cfgOptionIdxTest(optionId, optionIdx)) { MEM_CONTEXT_TEMP_BEGIN() { diff --git a/src/storage/helper.c b/src/storage/helper.c index be39d9d89..7dd3c4eaf 100644 --- a/src/storage/helper.c +++ b/src/storage/helper.c @@ -346,7 +346,7 @@ storageRepoGet(unsigned int repoIdx, bool write) { result = storageRemoteNew( STORAGE_MODE_FILE_DEFAULT, STORAGE_MODE_PATH_DEFAULT, write, storageRepoPathExpression, - protocolRemoteGet(protocolStorageTypeRepo, repoIdx), cfgOptionIdxUInt(cfgOptCompressLevelNetwork, repoIdx)); + protocolRemoteGet(protocolStorageTypeRepo, repoIdx), cfgOptionUInt(cfgOptCompressLevelNetwork)); } // Use Azure storage else