From: Kees Monshouwer Date: Sat, 28 Dec 2013 20:31:45 +0000 (+0100) Subject: catch ComboClass exceptions in communicator X-Git-Tag: rec-3.6.0-rc1~263^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79a454efaab654c61a586b89cb3a8543ad2be7f6;p=pdns catch ComboClass exceptions in communicator --- diff --git a/pdns/communicator.cc b/pdns/communicator.cc index 1a9ad891a..34be6a54c 100644 --- a/pdns/communicator.cc +++ b/pdns/communicator.cc @@ -63,12 +63,27 @@ void CommunicatorClass::go() pthread_create(&tid, 0, &retrieveLaunchhelper, this); // Starts CommunicatorClass::retrievalLoopThread() d_preventSelfNotification = ::arg().mustDo("prevent-self-notification"); - d_onlyNotify.toMasks(::arg()["only-notify"]); + + try { + d_onlyNotify.toMasks(::arg()["only-notify"]); + } + catch(PDNSException &e) { + L< parts; stringtok(parts, ::arg()["also-notify"], ", \t"); - for (vector::const_iterator iter = parts.begin(); iter != parts.end(); ++iter) - d_alsoNotify.insert(*iter); + for (vector::const_iterator iter = parts.begin(); iter != parts.end(); ++iter) { + try { + ComboAddress caIp(*iter, 53); + d_alsoNotify.insert(caIp.toStringWithPort()); + } + catch(PDNSException &e) { + L<alsoNotifies(domain, &alsoNotify); for(set::const_iterator j=alsoNotify.begin();j!=alsoNotify.end();++j) { - const ComboAddress caIp(*j, 53); - L<