mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Pass high_priority_service instead of void ptr for provider methods.
This commit is contained in:
@ -17,10 +17,9 @@ namespace wsrep
|
||||
wsrep::server_state& server_state,
|
||||
wsrep::mock_client_state* client_state,
|
||||
bool replaying)
|
||||
: wsrep::high_priority_service()
|
||||
: wsrep::high_priority_service(server_state)
|
||||
, fail_next_applying_()
|
||||
, fail_next_toi_()
|
||||
, server_state_(server_state)
|
||||
, client_state_(client_state)
|
||||
, replaying_(replaying)
|
||||
{ }
|
||||
@ -53,7 +52,6 @@ namespace wsrep
|
||||
private:
|
||||
mock_high_priority_service(const mock_high_priority_service&);
|
||||
mock_high_priority_service& operator=(const mock_high_priority_service&);
|
||||
wsrep::server_state& server_state_;
|
||||
wsrep::mock_client_state* client_state_;
|
||||
bool replaying_;
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ namespace wsrep
|
||||
int resync() { return 0; }
|
||||
wsrep::seqno pause() { return wsrep::seqno(0); }
|
||||
int resume() { return 0; }
|
||||
enum wsrep::provider::status run_applier(void*)
|
||||
enum wsrep::provider::status run_applier(wsrep::high_priority_service*)
|
||||
{
|
||||
return wsrep::provider::success;
|
||||
}
|
||||
@ -160,11 +160,12 @@ namespace wsrep
|
||||
return release_result_;
|
||||
}
|
||||
|
||||
enum wsrep::provider::status replay(const wsrep::ws_handle& ws_handle,
|
||||
void* ctx)
|
||||
enum wsrep::provider::status replay(
|
||||
const wsrep::ws_handle& ws_handle,
|
||||
wsrep::high_priority_service* hps)
|
||||
{
|
||||
wsrep::mock_high_priority_service& high_priority_service(
|
||||
*static_cast<wsrep::mock_high_priority_service*>(ctx));
|
||||
*static_cast<wsrep::mock_high_priority_service*>(hps));
|
||||
wsrep::mock_client_state& cc(
|
||||
*high_priority_service.client_state());
|
||||
wsrep::high_priority_context high_priority_context(cc);
|
||||
|
Reference in New Issue
Block a user