1
0
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:
Teemu Ollakka
2018-07-03 16:33:14 +03:00
parent 4e8dfca3f1
commit b9532e6497
4 changed files with 7 additions and 8 deletions

View File

@ -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.

View File

@ -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

View File

@ -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&);

View File

@ -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; }
//