From 919d27202375e98437ee8ed5fd3c8a889f81cf6d Mon Sep 17 00:00:00 2001 From: Hannu Ylitalo Date: Tue, 30 Aug 2016 13:58:51 +0300 Subject: [PATCH] pdnsutil: Catch possible PDNSException when doing setMaster in changeSlaveZoneMaster() --- pdns/pdnsutil.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 51d34326e..29793cce1 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 '"<