Browse Source

[3282] Removed use of std::string::back from header

Updated template method to use qualifyName as it should
have been. This also serves to remove use of std::string::back.
Thomas Markwalder 11 years ago
parent
commit
d38e7638f9
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/lib/dhcpsrv/d2_client.h

+ 2 - 8
src/lib/dhcpsrv/d2_client.h

@@ -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);
         }
     }
 }