mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-25 21:41:56 +03:00
Return provider status from set options.
This commit is contained in:
@ -314,7 +314,7 @@ namespace wsrep
|
||||
virtual void reset_status() = 0;
|
||||
|
||||
virtual std::string options() const = 0;
|
||||
virtual void options(const std::string&) = 0;
|
||||
virtual enum status options(const std::string&) = 0;
|
||||
|
||||
/**
|
||||
* Return pointer to native provider handle.
|
||||
|
@ -825,12 +825,10 @@ std::string wsrep::wsrep_provider_v26::options() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void wsrep::wsrep_provider_v26::options(const std::string& opts)
|
||||
enum wsrep::provider::status
|
||||
wsrep::wsrep_provider_v26::options(const std::string& opts)
|
||||
{
|
||||
if (wsrep_->options_set(wsrep_, opts.c_str()) != WSREP_OK)
|
||||
{
|
||||
throw wsrep::runtime_error("Failed to set provider options");
|
||||
}
|
||||
return map_return_value(wsrep_->options_set(wsrep_, opts.c_str()));
|
||||
}
|
||||
|
||||
void* wsrep::wsrep_provider_v26::native() const
|
||||
|
@ -67,7 +67,7 @@ namespace wsrep
|
||||
std::vector<status_variable> status() const;
|
||||
void reset_status();
|
||||
std::string options() const;
|
||||
void options(const std::string&);
|
||||
enum wsrep::provider::status options(const std::string&);
|
||||
void* native() const;
|
||||
private:
|
||||
wsrep_provider_v26(const wsrep_provider_v26&);
|
||||
|
@ -231,7 +231,8 @@ namespace wsrep
|
||||
}
|
||||
void reset_status() { }
|
||||
std::string options() const { return ""; }
|
||||
void options(const std::string&) { }
|
||||
enum wsrep::provider::status options(const std::string&)
|
||||
{ return wsrep::provider::success; }
|
||||
void* native() const { return 0; }
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user