summaryrefslogtreecommitdiff
path: root/bus/dir-watch-kqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/dir-watch-kqueue.c')
-rw-r--r--bus/dir-watch-kqueue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bus/dir-watch-kqueue.c b/bus/dir-watch-kqueue.c
index 183db241..15519fcb 100644
--- a/bus/dir-watch-kqueue.c
+++ b/bus/dir-watch-kqueue.c
@@ -218,12 +218,17 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
i = 0;
link = _dbus_list_get_first_link (directories);
- while (link != NULL)
+ while (link != NULL && i < MAX_DIRS_TO_WATCH)
{
new_dirs[i++] = (char *)link->data;
link = _dbus_list_get_next_link (directories, link);
}
+ if (link != NULL)
+ {
+ _dbus_warn ("Too many directories to watch them all, only watching first %d.", MAX_DIRS_TO_WATCH);
+ }
+
/* Look for directories in both the old and new sets, if
* we find one, move its data into the new set.
*/