From: Hannu Ylitalo Date: Tue, 30 Aug 2016 10:58:51 +0000 (+0300) Subject: pdnsutil: Catch possible PDNSException when doing setMaster in changeSlaveZoneMaster() X-Git-Tag: dnsdist-1.1.0-beta2~139^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=919d27202375e98437ee8ed5fd3c8a889f81cf6d;p=thirdparty%2Fpdns.git pdnsutil: Catch possible PDNSException when doing setMaster in changeSlaveZoneMaster() --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 51d34326e4..29793cce14 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1211,8 +1211,14 @@ int changeSlaveZoneMaster(const vector& cmds) { masters.push_back(master.toStringWithPort()); } cerr<<"Updating slave zone '"<setMaster(zone, boost::join(masters, ",")); - return EXIT_SUCCESS; + try { + di.backend->setMaster(zone, boost::join(masters, ",")); + return EXIT_SUCCESS; + } + catch (PDNSException& e) { + cerr<<"Setting master for zone '"<