return True;
}
+static int compare_notify_change_events(const void *p1, const void *p2)
+{
+ const struct notify_change_event *e1 = p1;
+ const struct notify_change_event *e2 = p2;
+
+ return timespec_compare(&e1->when, &e2->when);
+}
+
/****************************************************************************
Setup the common parts of the return packet and send it.
*****************************************************************************/
return;
}
+ /*
+ * Sort the notifies by timestamp when the event happened to avoid
+ * coalescing and thus dropping events in notify_marshall_changes.
+ */
+
+ qsort(notify_buf->changes, notify_buf->num_changes,
+ sizeof(*(notify_buf->changes)), compare_notify_change_events);
+
if (!notify_marshall_changes(notify_buf->num_changes, max_param,
notify_buf->changes, &blob)) {
/*