Commit Graph

7 Commits

Author SHA1 Message Date
ee912576b3 Separate platform indepenent code into monitor.c, and move inotify(7)
specific code to monitor_inotify.c.
Both monitor_inotify.c and monitor_kqueue.c provide their functions
for adding and removing watches. Prefix these functions with monitor_.
2021-01-07 10:58:29 -08:00
da30df3350 Remove C99 code. 2018-01-16 17:05:40 -08:00
7428b8dede This file is derived from code by Bernard Spil. Fix copyright. 2018-01-16 17:04:32 -08:00
1cb676f51d Add license and my copyright to monitor_kqueue.c. The file contains portions of code that were made either by William or by Stefan. Since I am unsure about that, put them both. To be clarified later. 2018-01-16 17:03:20 -08:00
d6374fa4e2 Fix SQL queries that intended to match directories. Code originates from FreeBSD ports extra patch. Probably it was working on previous versions of SQLite, or on previous minidlna schema. 2018-01-16 17:02:05 -08:00
dfdd81a09f Wrap struct event into struct watch. For now this is just code bloat. We might start monitoring files later. We also might want to create a tree/list of all watches if we ever need to search within them, like the inotify module does. 2018-01-16 17:01:55 -08:00
5e320f2798 Add monitoring support via kqueue(2). Based on patch from FreeBSD ports, authored by wg@FreeBSD.org and se@FreeBSD.org. However, this version doesn't create any thread, it uses main event dispatcher.
Some effort was made to unify monitoring via kqueue and via inotify
APIs. Now both provide their implementation of add_watch() function.

I guess there are some logical bugs in vnode_process(). With this commit
it would be better provide code as is, and resolve bugs separately.
2018-01-16 17:01:43 -08:00