summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configutil/src/tests/config_status/config_status_test.cpp2
-rw-r--r--vespalib/src/tests/portal/portal_test.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/portal/portal.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/portal/portal.h10
4 files changed, 10 insertions, 10 deletions
diff --git a/configutil/src/tests/config_status/config_status_test.cpp b/configutil/src/tests/config_status/config_status_test.cpp
index 304d4518b41..3cc5b2f4525 100644
--- a/configutil/src/tests/config_status/config_status_test.cpp
+++ b/configutil/src/tests/config_status/config_status_test.cpp
@@ -19,7 +19,7 @@ private:
bool _fail;
Portal::Token::UP _root;
- void get(Portal::GetRequest request) const override {
+ void get(Portal::GetRequest request) override {
if (_fail) {
request.respond_with_error(500, "Error");
} else {
diff --git a/vespalib/src/tests/portal/portal_test.cpp b/vespalib/src/tests/portal/portal_test.cpp
index 6d0d04620d0..299340fd131 100644
--- a/vespalib/src/tests/portal/portal_test.cpp
+++ b/vespalib/src/tests/portal/portal_test.cpp
@@ -83,7 +83,7 @@ struct MyGetHandler : public Portal::GetHandler {
std::function<void(Portal::GetRequest)> fun;
template <typename F>
MyGetHandler(F &&f) : fun(std::move(f)) {}
- void get(Portal::GetRequest request) const override {
+ void get(Portal::GetRequest request) override {
fun(std::move(request));
}
~MyGetHandler();
diff --git a/vespalib/src/vespa/vespalib/portal/portal.cpp b/vespalib/src/vespa/vespalib/portal/portal.cpp
index 031f364faff..0d62d5728d1 100644
--- a/vespalib/src/vespa/vespalib/portal/portal.cpp
+++ b/vespalib/src/vespa/vespalib/portal/portal.cpp
@@ -88,7 +88,7 @@ Portal::cancel_token(Token &token)
}
portal::HandleGuard
-Portal::lookup_get_handler(const vespalib::string &uri, const GetHandler *&handler)
+Portal::lookup_get_handler(const vespalib::string &uri, GetHandler *&handler)
{
std::lock_guard guard(_lock);
for (const auto &entry: _bind_list) {
@@ -130,7 +130,7 @@ Portal::handle_http(portal::HttpConnection *conn)
} else if (!conn->get_request().is_get()) {
conn->respond_with_error(501, "Not Implemented");
} else {
- const GetHandler *get_handler = nullptr;
+ GetHandler *get_handler = nullptr;
auto guard = lookup_get_handler(conn->get_request().get_uri(), get_handler);
if (guard.valid()) {
assert(get_handler != nullptr);
@@ -182,7 +182,7 @@ Portal::create(CryptoEngine::SP crypto, int port)
}
Portal::Token::UP
-Portal::bind(const vespalib::string &path_prefix, const GetHandler &handler)
+Portal::bind(const vespalib::string &path_prefix, GetHandler &handler)
{
auto token = make_token();
std::lock_guard guard(_lock);
diff --git a/vespalib/src/vespa/vespalib/portal/portal.h b/vespalib/src/vespa/vespalib/portal/portal.h
index aa696c85fa2..93424dda90c 100644
--- a/vespalib/src/vespa/vespalib/portal/portal.h
+++ b/vespalib/src/vespa/vespalib/portal/portal.h
@@ -67,7 +67,7 @@ public:
};
struct GetHandler {
- virtual void get(GetRequest request) const = 0;
+ virtual void get(GetRequest request) = 0;
virtual ~GetHandler();
};
@@ -75,8 +75,8 @@ private:
struct BindState {
uint64_t handle;
vespalib::string prefix;
- const GetHandler *handler;
- BindState(uint64_t handle_in, vespalib::string prefix_in, const GetHandler &handler_in)
+ GetHandler *handler;
+ BindState(uint64_t handle_in, vespalib::string prefix_in, GetHandler &handler_in)
: handle(handle_in), prefix(prefix_in), handler(&handler_in) {}
bool operator<(const BindState &rhs) const {
if (prefix.size() == rhs.prefix.size()) {
@@ -98,7 +98,7 @@ private:
Token::UP make_token();
void cancel_token(Token &token);
- portal::HandleGuard lookup_get_handler(const vespalib::string &uri, const GetHandler *&handler);
+ portal::HandleGuard lookup_get_handler(const vespalib::string &uri, GetHandler *&handler);
void evict_handle(uint64_t handle);
void handle_accept(portal::HandleGuard guard, SocketHandle socket);
@@ -110,7 +110,7 @@ public:
static SP create(CryptoEngine::SP crypto, int port);
int listen_port() const { return _listener->listen_port(); }
const vespalib::string &my_host() const { return _my_host; }
- Token::UP bind(const vespalib::string &path_prefix, const GetHandler &handler);
+ Token::UP bind(const vespalib::string &path_prefix, GetHandler &handler);
};
} // namespace vespalib