]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3106] Use getThisServerName() in a few places
authorMarcin Siodelski <marcin@isc.org>
Tue, 28 Nov 2023 20:49:02 +0000 (21:49 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 29 Nov 2023 19:58:56 +0000 (20:58 +0100)
src/hooks/dhcp/high_availability/ha_service.cc

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