From: Chris Hofstaedtler Date: Wed, 12 Oct 2022 13:47:12 +0000 (+0200) Subject: API: Auth: updateDomainSettingsFromDocument: remove always disabled argument X-Git-Tag: dnsdist-1.8.0-rc1~202^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=002de4d7711955188c68726cc9584988b0c89a31;p=thirdparty%2Fpdns.git API: Auth: updateDomainSettingsFromDocument: remove always disabled argument --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 648938d31f..7cd51079a1 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -656,7 +656,8 @@ static void extractDomainInfoFromDocument(const Json& document, boost::optional< } } -static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& di, const DNSName& zonename, const Json& document, bool rectifyTransaction=true) { +// Must be called within backend transaction. +static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& di, const DNSName& zonename, const Json& document) { boost::optional kind; boost::optional> masters; boost::optional catalog; @@ -802,7 +803,7 @@ static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& if (api_rectify == "1") { string info; string error_msg; - if (!dk.rectifyZone(zonename, error_msg, info, rectifyTransaction)) { + if (!dk.rectifyZone(zonename, error_msg, info, false)) { throw ApiException("Failed to rectify '" + zonename.toString() + "' " + error_msg); } } @@ -1840,7 +1841,7 @@ static void apiServerZones(HttpRequest* req, HttpResponse* resp) { di.backend->feedComment(c); } - updateDomainSettingsFromDocument(B, di, zonename, document, false); + updateDomainSettingsFromDocument(B, di, zonename, document); di.backend->commitTransaction(); @@ -1907,7 +1908,7 @@ static void apiServerZoneDetail(HttpRequest* req, HttpResponse* resp) { // update domain settings di.backend->startTransaction(zonename, -1); - updateDomainSettingsFromDocument(B, di, zonename, req->json(), false); + updateDomainSettingsFromDocument(B, di, zonename, req->json()); di.backend->commitTransaction(); resp->body = "";