Commit 8b47d98c authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2836] Call resetHeader at better times

parent 8da51f50
...@@ -54,14 +54,13 @@ ZoneWriter::load() { ...@@ -54,14 +54,13 @@ ZoneWriter::load() {
} }
zone_data_ = load_action_(segment_.getMemorySegment()); zone_data_ = load_action_(segment_.getMemorySegment());
segment_.resetHeader();
if (!zone_data_) { if (!zone_data_) {
// Bug inside load_action_. // Bug inside load_action_.
isc_throw(isc::InvalidOperation, "No data returned from load action"); isc_throw(isc::InvalidOperation, "No data returned from load action");
} }
segment_.resetHeader();
state_ = ZW_LOADED; state_ = ZW_LOADED;
} }
...@@ -86,11 +85,10 @@ ZoneWriter::install() { ...@@ -86,11 +85,10 @@ ZoneWriter::install() {
zone_data_)); zone_data_));
state_ = ZW_INSTALLED; state_ = ZW_INSTALLED;
zone_data_ = result.zone_data; zone_data_ = result.zone_data;
} catch (const isc::util::MemorySegmentGrown&) { } catch (const isc::util::MemorySegmentGrown&) {}
}
}
segment_.resetHeader(); segment_.resetHeader();
}
} }
void void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment