Move some Monitor fields to private and protected
None of the fields should be publicly writable and some should not even be writable from derived classes.
This commit is contained in:
@ -182,8 +182,8 @@ bool MariaDBMonitor::set_replication_credentials(const MXS_CONFIG_PARAMETER* par
|
||||
else
|
||||
{
|
||||
// Ok, neither is set. Use monitor credentials.
|
||||
repl_user = m_settings.conn_settings.username;
|
||||
repl_pw = m_settings.conn_settings.password;
|
||||
repl_user = settings().conn_settings.username;
|
||||
repl_pw = settings().conn_settings.password;
|
||||
}
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ void MariaDBMonitor::tick()
|
||||
|
||||
// Query all servers for their status.
|
||||
bool should_update_disk_space = check_disk_space_this_tick();
|
||||
const auto& conn_settings = m_settings.conn_settings;
|
||||
const auto& conn_settings = settings().conn_settings;
|
||||
|
||||
auto update_task = [should_update_disk_space, conn_settings](MariaDBServer* server) {
|
||||
server->update_server(should_update_disk_space, conn_settings);
|
||||
|
||||
Reference in New Issue
Block a user