Commit 3c0e0960 authored by Libor Peltan's avatar Libor Peltan

flush to zonefile if zf_sync==0 && zone updated on load event

parent 63de7643
......@@ -164,6 +164,8 @@ int event_load(conf_t *conf, zone_t *zone)
goto cleanup;
}
int zf_serial = (zf_conts == NULL ? -1 : (int)zone_contents_serial(zf_conts));
// The contents are already part of zone_update.
zf_conts = NULL;
journal_conts = NULL;
......@@ -212,6 +214,13 @@ int event_load(conf_t *conf, zone_t *zone)
zone_events_schedule_now(zone, ZONE_EVENT_NOTIFY);
}
if (zf_serial > -1 && (uint32_t)zf_serial != new_serial) {
val = conf_zone_get(conf, C_ZONEFILE_SYNC, zone->name);
if (conf_int(&val) == 0) {
zone_events_schedule_now(zone, ZONE_EVENT_FLUSH);
}
}
return KNOT_EOK;
cleanup:
......
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