diff --git a/include/webfuse/adapter/authenticate.h b/include/webfuse/adapter/authenticate.h index e11e300..0146768 100644 --- a/include/webfuse/adapter/authenticate.h +++ b/include/webfuse/adapter/authenticate.h @@ -31,7 +31,7 @@ struct wf_credentials; /// \see wf_server_protocol_add_authenticator //------------------------------------------------------------------------------ typedef bool wf_authenticate_fn( - struct wf_credentials * credentials, + struct wf_credentials const * credentials, void * user_data); #ifdef __cplusplus diff --git a/test/webfuse/mocks/mock_authenticator.cc b/test/webfuse/mocks/mock_authenticator.cc index 35648ed..4aee1bb 100644 --- a/test/webfuse/mocks/mock_authenticator.cc +++ b/test/webfuse/mocks/mock_authenticator.cc @@ -23,17 +23,17 @@ void set_authenticator(size_t i, Authenticator * authenticator) g_authenticators[i] = authenticator; } -bool authenticate(struct wf_credentials * creds, void * user_data) +bool authenticate(struct wf_credentials const * creds, void * user_data) { return g_authenticators[0]->authenticate(creds, user_data); } -bool authenticate_1(struct wf_credentials * creds, void * user_data) +bool authenticate_1(struct wf_credentials const * creds, void * user_data) { return g_authenticators[1]->authenticate(creds, user_data); } -bool authenticate_2(struct wf_credentials * creds, void * user_data) +bool authenticate_2(struct wf_credentials const * creds, void * user_data) { return g_authenticators[2]->authenticate(creds, user_data); } diff --git a/test/webfuse/mocks/mock_authenticator.hpp b/test/webfuse/mocks/mock_authenticator.hpp index bb38be3..ac7f2bf 100644 --- a/test/webfuse/mocks/mock_authenticator.hpp +++ b/test/webfuse/mocks/mock_authenticator.hpp @@ -12,22 +12,22 @@ class Authenticator public: virtual ~Authenticator() { } virtual bool authenticate( - struct wf_credentials * credentials, + struct wf_credentials const * credentials, void * user_data) = 0; }; class MockAuthenticator: public Authenticator { public: - MOCK_METHOD2(authenticate, bool (struct wf_credentials * credentials, void * user_data)); + MOCK_METHOD2(authenticate, bool (struct wf_credentials const * credentials, void * user_data)); }; void set_authenticator(Authenticator * authenticator); void set_authenticator(size_t index, Authenticator * authenticator); -bool authenticate(struct wf_credentials * creds, void * user_data); -bool authenticate_1(struct wf_credentials * creds, void * user_data); -bool authenticate_2(struct wf_credentials * creds, void * user_data); +bool authenticate(struct wf_credentials const * creds, void * user_data); +bool authenticate_1(struct wf_credentials const * creds, void * user_data); +bool authenticate_2(struct wf_credentials const * creds, void * user_data); } diff --git a/test/webfuse/tests/adapter/test_server_config.cc b/test/webfuse/tests/adapter/test_server_config.cc index b9687be..ceec97d 100644 --- a/test/webfuse/tests/adapter/test_server_config.cc +++ b/test/webfuse/tests/adapter/test_server_config.cc @@ -20,7 +20,7 @@ wf_mountpoint * create_mountpoint( } bool authenticate( - wf_credentials * credentials, + wf_credentials const * credentials, void * user_data) { (void) credentials; diff --git a/test/webfuse/tests/integration/test_lowlevel.cc b/test/webfuse/tests/integration/test_lowlevel.cc index 050b23a..0c49192 100644 --- a/test/webfuse/tests/integration/test_lowlevel.cc +++ b/test/webfuse/tests/integration/test_lowlevel.cc @@ -37,7 +37,7 @@ wf_test_integration_lowlevel_on_disconnected( bool wf_test_integration_lowlevel_authenticate( - struct wf_credentials * credentials, + struct wf_credentials const * credentials, void * ) { char const * username = wf_credentials_get(credentials, "username");