]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ignore DELETE events for the directory
authorAlan T. DeKok <aland@freeradius.org>
Wed, 6 Dec 2017 16:52:55 +0000 (11:52 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 6 Dec 2017 16:52:55 +0000 (11:52 -0500)
we didn't ask for them, but libkqueue delivers them to us

src/modules/proto_detail/proto_detail_file.c

index 01cba816ecdd9e384ba5c5aa69eb704a8d08e0fd..2a7ec9d368d2a91d63c5bb6dd0931a2be5dec485 100644 (file)
@@ -438,6 +438,13 @@ static void mod_vnode_delete(fr_event_list_t *el, int fd, UNUSED int fflags, voi
 
        DEBUG("proto_detail (%s): Deleted %s", inst->name, inst->filename_work);
 
+       /*
+        *      Silently ignore notifications from the directory.  We
+        *      didn't ask for them, but libkqueue delivers them to
+        *      us.
+        */
+       if (fd == inst->fd) return;
+
        if (fd != inst->vnode_fd) {
                ERROR("Received DELETE for FD %d, when we were expecting one on FD %d - ignoring it",
                      fd, inst->vnode_fd);