SlaveStatus::to_short_string() uses member field

The owner server name is now stored in a field.
This commit is contained in:
Esa Korhonen
2018-10-09 18:32:31 +03:00
parent 2f1512a22d
commit d0444ff054
4 changed files with 32 additions and 27 deletions

View File

@ -49,17 +49,17 @@ string SlaveStatus::to_string() const
return rval;
}
string SlaveStatus::to_short_string(const string& owner) const
string SlaveStatus::to_short_string() const
{
if (name.empty())
{
return string_printf("Slave connection from %s to [%s]:%i",
owner.c_str(), master_host.c_str(), master_port);
owning_server.c_str(), master_host.c_str(), master_port);
}
else
{
return string_printf("Slave connection '%s' from %s to [%s]:%i",
name.c_str(), owner.c_str(), master_host.c_str(), master_port);
name.c_str(), owning_server.c_str(), master_host.c_str(), master_port);
}
}