diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2022-11-24 20:31:34 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2022-12-05 15:14:43 +0100 |
commit | 089cbd1023f4cb7b7495362152f1583fd615ff71 (patch) | |
tree | 5582dbdad5db85044e0b44079174b99bb3a0ebf4 /src/utils | |
parent | doc/reference: make effect of missing ACL "address" and "key" items clear (diff) | |
download | knot-089cbd1023f4cb7b7495362152f1583fd615ff71.tar.xz knot-089cbd1023f4cb7b7495362152f1583fd615ff71.zip |
zonedb: reload changed catalog members only (reuse otherwise), refactoring
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/knotd/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/knotd/main.c b/src/utils/knotd/main.c index 3f8ce4b5a..34990288f 100644 --- a/src/utils/knotd/main.c +++ b/src/utils/knotd/main.c @@ -259,11 +259,13 @@ static void event_loop(server_t *server, const char *socket) /* Interrupts. */ if (sig_req_reload && !sig_req_stop) { sig_req_reload = false; - server_reload(server); + server_reload(server, RELOAD_FULL); } if (sig_req_zones_reload && !sig_req_stop) { sig_req_zones_reload = false; - server_update_zones(conf(), server); + reload_t mode = server->catalog_upd_signal ? RELOAD_CATALOG : RELOAD_ZONES; + server->catalog_upd_signal = false; + server_update_zones(conf(), server, mode); } if (sig_req_stop) { break; @@ -571,7 +573,7 @@ int main(int argc, char **argv) /* Populate zone database. */ log_info("loading %zu zones", conf_id_count(conf(), C_ZONE)); - server_update_zones(conf(), &server); + server_update_zones(conf(), &server, RELOAD_ZONES); /* Check number of loaded zones. */ if (knot_zonedb_size(server.zone_db) == 0) { |