aboutsummaryrefslogtreecommitdiff
path: root/src/filemanager.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-23 19:45:20 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-02-24 10:32:24 +0100
commit25f8c03774bd639af9e07f616211caada9d307f0 (patch)
tree84d8bf3644da6398cd0abeed0a5435f9863d727c /src/filemanager.cpp
parent57595327b253f23ba4330fb1cda3d7bb66bbc81d (diff)
downloadPROJ-25f8c03774bd639af9e07f616211caada9d307f0.tar.gz
PROJ-25f8c03774bd639af9e07f616211caada9d307f0.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() != '/') {