]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
ctl: use event scheduler for zone expiration instead of direct call
authorLibor Peltan <libor.peltan@nic.cz>
Wed, 27 Jun 2018 13:58:33 +0000 (15:58 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 27 Jun 2018 14:47:45 +0000 (16:47 +0200)
src/knot/ctl/commands.c

index 910789fa72c8612c51ea024ed4559860a9211fcc..cf203b6ad3ad45b8eb47bf5a89095ca3dae0f973 100644 (file)
@@ -23,7 +23,7 @@
 #include "knot/conf/confio.h"
 #include "knot/ctl/commands.h"
 #include "knot/dnssec/key-events.h"
-#include "knot/events/handlers.h"
+#include "knot/events/events.h"
 #include "knot/events/log.h"
 #include "knot/nameserver/query_module.h"
 #include "knot/updates/zone-update.h"
@@ -1122,7 +1122,7 @@ static int zone_purge(zone_t *zone, ctl_args_t *args)
 
        // Expire the zone.
        if (MATCH_OR_FILTER(args, CTL_FILTER_PURGE_EXPIRE)) {
-               (void)event_expire(conf(), zone);
+               zone_events_schedule_user(zone, ZONE_EVENT_EXPIRE);
        }
 
        // Purge the zone file.