BIND 10 trac2178, updated. 092430baa3e8b2ed9ed297718c3a8e50cf928b3d [2178] reduce try-catch masterloaderror scope
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Aug 24 13:35:20 UTC 2012
The branch, trac2178 has been updated
via 092430baa3e8b2ed9ed297718c3a8e50cf928b3d (commit)
from bca8812cd6c77607b21536f7ef1a9496c7e210cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 092430baa3e8b2ed9ed297718c3a8e50cf928b3d
Author: Jelte Jansen <jelte at isc.org>
Date: Fri Aug 24 15:20:13 2012 +0200
[2178] reduce try-catch masterloaderror scope
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/client_list.cc | 47 ++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 23 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/client_list.cc b/src/lib/datasrc/client_list.cc
index 8c37624..3c0ea19 100644
--- a/src/lib/datasrc/client_list.cc
+++ b/src/lib/datasrc/client_list.cc
@@ -140,32 +140,33 @@ ConfigurableClientList::configure(const ConstElementPtr& config,
client(new_data_sources.back().data_src_client_);
for (vector<string>::const_iterator it(zones_origins.begin());
it != zones_origins.end(); ++it) {
- try {
- const Name origin(*it);
- shared_ptr<InMemoryZoneFinder>
- finder(new
- InMemoryZoneFinder(rrclass_, origin));
- if (type == "MasterFiles") {
+ const Name origin(*it);
+ shared_ptr<InMemoryZoneFinder>
+ finder(new
+ InMemoryZoneFinder(rrclass_, origin));
+ if (type == "MasterFiles") {
+ try {
finder->load(paramConf->get(*it)->stringValue());
- } else {
- ZoneIteratorPtr iterator;
- try {
- iterator = client->getIterator(origin);
- } catch (const DataSourceError&) {
- isc_throw(ConfigurationError, "Unable to "
- "cache non-existent zone "
- << origin);
- }
- if (!iterator) {
- isc_throw(isc::Unexpected, "Got NULL iterator "
- "for zone " << origin);
- }
- finder->load(*iterator);
+ cache->addZone(finder);
+ } catch (const isc::dns::MasterLoadError& mle) {
+ LOG_ERROR(logger, DATASRC_MASTERLOAD_ERROR)
+ .arg(mle.what());
}
+ } else {
+ ZoneIteratorPtr iterator;
+ try {
+ iterator = client->getIterator(origin);
+ } catch (const DataSourceError&) {
+ isc_throw(ConfigurationError, "Unable to "
+ "cache non-existent zone "
+ << origin);
+ }
+ if (!iterator) {
+ isc_throw(isc::Unexpected, "Got NULL iterator "
+ "for zone " << origin);
+ }
+ finder->load(*iterator);
cache->addZone(finder);
- } catch (const isc::dns::MasterLoadError& mle) {
- LOG_ERROR(logger, DATASRC_MASTERLOAD_ERROR)
- .arg(mle.what());
}
}
}
More information about the bind10-changes
mailing list