2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#3106] Use getThisServerName() in a few places

This commit is contained in:
Marcin Siodelski
2023-11-28 21:49:02 +01:00
parent 66a4c4f973
commit 7c07cd96e6

View File

@@ -1712,7 +1712,7 @@ HAService::asyncSendHeartbeat() {
(HttpRequest::Method::HTTP_POST, "/", HttpVersion::HTTP_11(), (HttpRequest::Method::HTTP_POST, "/", HttpVersion::HTTP_11(),
HostHttpHeader(partner_config->getUrl().getStrippedHostname())); HostHttpHeader(partner_config->getUrl().getStrippedHostname()));
partner_config->addBasicAuthHttpHeader(request); partner_config->addBasicAuthHttpHeader(request);
request->setBodyAsJson(CommandCreator::createHeartbeat(config_->getThisServerConfig()->getName(), request->setBodyAsJson(CommandCreator::createHeartbeat(config_->getThisServerName(),
server_type_)); server_type_));
request->finalize(); request->finalize();
@@ -2550,7 +2550,7 @@ void
HAService::asyncSendHAReset(HttpClient& http_client, HAService::asyncSendHAReset(HttpClient& http_client,
const HAConfig::PeerConfigPtr& config, const HAConfig::PeerConfigPtr& config,
PostRequestCallback post_request_action) { PostRequestCallback post_request_action) {
ConstElementPtr command = CommandCreator::createHAReset(config_->getThisServerConfig()->getName(), ConstElementPtr command = CommandCreator::createHAReset(config_->getThisServerName(),
server_type_); server_type_);
// Create HTTP/1.1 request including our command. // Create HTTP/1.1 request including our command.
@@ -2920,7 +2920,7 @@ HAService::asyncSyncCompleteNotify(HttpClient& http_client,
remote_config->addBasicAuthHttpHeader(request); remote_config->addBasicAuthHttpHeader(request);
request->setBodyAsJson(CommandCreator::createSyncCompleteNotify(NetworkState::HA_REMOTE_COMMAND+id_, request->setBodyAsJson(CommandCreator::createSyncCompleteNotify(NetworkState::HA_REMOTE_COMMAND+id_,
config_->getThisServerConfig()->getName(), config_->getThisServerName(),
server_type_)); server_type_));
request->finalize(); request->finalize();