aboutsummaryrefslogtreecommitdiff
path: root/src/filemanager.cpp
diff options
context:
space:
mode:
authorgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2020-02-24 09:32:55 +0000
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2020-02-24 09:32:55 +0000
commit9f1afa969a3a18bd2b8298968799c206c63d2a19 (patch)
tree84d8bf3644da6398cd0abeed0a5435f9863d727c /src/filemanager.cpp
parent595686c3235a0c9a7fb05e3f4927a569963fcbc6 (diff)
downloadPROJ-9f1afa969a3a18bd2b8298968799c206c63d2a19.tar.gz
PROJ-9f1afa969a3a18bd2b8298968799c206c63d2a19.zip
Expose proj_context_is_network_enabled() in C API
Diffstat (limited to 'src/filemanager.cpp')
-rw-r--r--src/filemanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp
index 165a5b15..d7c55fba 100644
--- a/src/filemanager.cpp
+++ b/src/filemanager.cpp
@@ -944,7 +944,7 @@ std::unique_ptr<File> FileApiAdapter::open(PJ_CONTEXT *ctx,
std::unique_ptr<File> FileManager::open(PJ_CONTEXT *ctx, const char *filename,
FileAccess access) {
if (starts_with(filename, "http://") || starts_with(filename, "https://")) {
- if (!pj_context_is_network_enabled(ctx)) {
+ if (!proj_context_is_network_enabled(ctx)) {
pj_log(
ctx, PJ_LOG_ERROR,
"Attempt at accessing remote resource not authorized. Either "
@@ -1672,7 +1672,8 @@ NS_PROJ::FileManager::open_resource_file(projCtx ctx, const char *name) {
if (file == nullptr && !is_tilde_slash(name) &&
!is_rel_or_absolute_filename(name) && !starts_with(name, "http://") &&
- !starts_with(name, "https://") && pj_context_is_network_enabled(ctx)) {
+ !starts_with(name, "https://") &&
+ proj_context_is_network_enabled(ctx)) {
std::string remote_file(pj_context_get_url_endpoint(ctx));
if (!remote_file.empty()) {
if (remote_file.back() != '/') {