]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3282] Removed use of std::string::back from header
authorThomas Markwalder <tmark@isc.org>
Mon, 20 Jan 2014 16:34:55 +0000 (11:34 -0500)
committerThomas Markwalder <tmark@isc.org>
Mon, 20 Jan 2014 16:34:55 +0000 (11:34 -0500)
Updated template method to use qualifyName as it should
have been. This also serves to remove use of std::string::back.

src/lib/dhcpsrv/d2_client.h

index 00295888c87b61eb647ec704ce4f24956625bd1b..d179387db35276a89df52295d8da4683e3399d28 100644 (file)
@@ -375,14 +375,8 @@ D2ClientMgr::adjustDomainName(OPT& fqdn, OPT& fqdn_resp) {
     } else {
         // If the supplied name is partial, qualify it by adding the suffix.
         if (fqdn.getDomainNameType() == OPT::PARTIAL) {
-            std::ostringstream name;
-            name << fqdn.getDomainName();
-            name << "." << (d2_client_config_->getQualifyingSuffix());
-            if (d2_client_config_->getQualifyingSuffix().back() != '.') {
-                name << ".";
-            }
-
-            fqdn_resp.setDomainName(name.str(), OPT::FULL);
+            fqdn_resp.setDomainName(qualifyName(fqdn.getDomainName()),
+                                    OPT::FULL);
         }
     }
 }