diff --git a/VERSION b/VERSION index 2f4320f67..6521720b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.4 +1.24.5 diff --git a/src/eckit/filesystem/URI.cc b/src/eckit/filesystem/URI.cc index f30245e17..0dec1d4e0 100644 --- a/src/eckit/filesystem/URI.cc +++ b/src/eckit/filesystem/URI.cc @@ -219,7 +219,11 @@ std::string URI::authority() const { } void URI::query(const std::string& attribute, const std::string& value) { - queryValues_[attribute] = encode(value); + if (value.empty()) { + queryValues_.erase(attribute); + } else { + queryValues_[attribute] = encode(value); + } } const std::string URI::query(const std::string& attribute) const { diff --git a/src/eckit/io/PooledFile.cc b/src/eckit/io/PooledFile.cc index 2de01763d..2eab33485 100644 --- a/src/eckit/io/PooledFile.cc +++ b/src/eckit/io/PooledFile.cc @@ -73,10 +73,9 @@ class PoolFileEntry { void remove(const PooledFile* file) { auto s = statuses_.find(file); - ASSERT(s != statuses_.end()); - - statuses_.erase(s); - + if (s != statuses_.end()) { + statuses_.erase(s); + } if (statuses_.size() == 0) { doClose(); pool_.erase(name_); @@ -114,10 +113,10 @@ class PoolFileEntry { void close(const PooledFile* file) { auto s = statuses_.find(file); - ASSERT(s != statuses_.end()); - - ASSERT(s->second.opened_); - s->second.opened_ = false; + if (s != statuses_.end()) { + ASSERT(s->second.opened_); + s->second.opened_ = false; + } } int fileno(const PooledFile* file) const { diff --git a/src/eckit/net/Endpoint.h b/src/eckit/net/Endpoint.h index 3fbb12e81..5ad08bcb2 100644 --- a/src/eckit/net/Endpoint.h +++ b/src/eckit/net/Endpoint.h @@ -38,6 +38,8 @@ class Endpoint { const std::string& host() const { return host_; } int port() const { return port_; } + std::string hostport() const { return host_+":"+std::to_string(port_); } + bool operator==(const net::Endpoint& other); void print(std::ostream& os) const;