From 2e919ff9d045c3eef0e2b126060c6b886368a258 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 14 May 2024 11:27:43 +0800 Subject: [PATCH] fix(cos/checks3): failed early if not enabled --- source/common/src/cos.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/common/src/cos.c b/source/common/src/cos.c index 26c936c48d..6c46f4ff42 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -63,6 +63,11 @@ static int32_t s3ListBucket(char const *bucketname); int32_t s3CheckCfg() { int32_t code = 0; + if (!tsS3Enabled) { + fprintf(stderr, "s3 not configured.\n"); + goto _exit; + } + code = s3Begin(); if (code != 0) { fprintf(stderr, "failed to initialize s3.\n");