Commit ed78cecd authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

zone-in-journal: storing fresh zone contents into journal (AXFR, UPDATE_FULL)

parent 6f924651
......@@ -220,6 +220,13 @@ static int axfr_finalize(struct refresh_data *data)
return ret;
}
ret = zone_in_journal_store(data->conf, data->zone, new_zone);
if (ret != KNOT_EOK && ret != KNOT_EEXIST && ret != KNOT_ENOTSUP) {
IXFRIN_LOG(LOG_WARNING, data->zone->name, data->remote,
"failed to write zone contents to journal (%s)",
knot_strerror(ret));
}
zone_contents_t *old_zone = zone_switch_contents(data->zone, new_zone);
xfr_log_publish(data->zone->name, data->remote, old_zone, new_zone);
......
......@@ -572,6 +572,12 @@ static int commit_full(conf_t *conf, zone_update_t *update, zone_contents_t **co
}
}
/* Store new zone contents in journal. */
ret = zone_in_journal_store(conf, update->zone, update->new_cont);
if (ret != KNOT_EOK && ret != KNOT_EEXIST && ret != KNOT_ENOTSUP) {
return ret;
}
*contents_out = update->new_cont;
return KNOT_EOK;
......
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