| 78 | } |
| 79 | |
| 80 | int MasterManager::GenMasterInfoByLocal(const string &master_ip, MasterInfo *info) { |
| 81 | int ret = GetMasterInfo(info); |
| 82 | if (ret) |
| 83 | return ret; |
| 84 | |
| 85 | info->set_port(option_->GetMySqlConfig()->GetMySQLPort()); |
| 86 | info->set_svr_id(Utils::GetSvrID(master_ip)); |
| 87 | |
| 88 | return OK; |
| 89 | } |
| 90 | |
| 91 | bool MasterManager::IsMaster(const MasterInfo &info) { |
| 92 | return info.svr_id() == option_->GetBinLogSvrConfig()->GetEngineSvrID() && !IsTimeOut(info); |
no test coverage detected