From 2fe60c9635f71b009b8aee865923be0f51b36ec2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 5 Aug 2020 15:20:55 +0100 Subject: [PATCH] =?UTF-8?q?Terraysnc:=20fix=20incorrect=20handling=20of=20?= =?UTF-8?q?=E2=80=98entirely=20ocean=E2=80=99=20tiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We had some confusion between two error codes, meaning we would log an error (and treat as a failure) a pure ocean 1x1 area, even though this was entirely correct and expected behaviour. Terrasync.cxx expected REPO_ERROR_NOT_FOUND, we need to convert the file-level error to that, and avoid logging a warning. --- simgear/io/HTTPRepository.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 59fa8dc0..52b87498 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -1173,8 +1173,12 @@ HTTPRepository::failure() const void HTTPRepoPrivate::failedToGetRootIndex(HTTPRepository::ResultCode st) { - SG_LOG(SG_TERRASYNC, SG_WARN, "Failed to get root of repo:" << baseUrl << " " << st); - status = st; + if (st == HTTPRepository::REPO_ERROR_FILE_NOT_FOUND) { + status = HTTPRepository::REPO_ERROR_NOT_FOUND; + } else { + SG_LOG(SG_TERRASYNC, SG_WARN, "Failed to get root of repo:" << baseUrl << " " << st); + status = st; + } } void HTTPRepoPrivate::failedToUpdateChild(const SGPath& relativePath,