summaryrefslogtreecommitdiff
path: root/core/ninep/events.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/ninep/events.zig')
-rw-r--r--core/ninep/events.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ninep/events.zig b/core/ninep/events.zig
index 1951a434..1fd05b54 100644
--- a/core/ninep/events.zig
+++ b/core/ninep/events.zig
@@ -332,7 +332,7 @@ fn newest(p: *Pardes) ?struct { at: usize, seq: u64, text: []const u8 } {
/// Whether a follower has read the record `seq`, or is part way through it.
fn followerRead(p: *Pardes, seq: u64) bool {
- for (p.fs.opens) |o| if (o.node != 0 and o.what == .log) {
+ for (p.fs.opens[0..p.fs.opens_len]) |o| if (o.node != 0 and o.what == .log) {
const l = o.what.log;
if (l.follow and (l.next > seq or (l.next == seq and l.part > 0))) return true;
};
@@ -437,6 +437,8 @@ fn pushLog(p: *Pardes, raw: []u8) void {
/// What an open of /log holds.
pub const LogOpen = struct {
+ /// Its reader's alone: what it is answered with (the log is the session's).
+ pub const replica = .{ .authority = .{ "bytes", "follow", "next", "part", "pos" } };
/// The ring's text when it was opened.
bytes: []const u8 = &.{},
/// This open waits for records after `bytes`, from `next`.