diff options
Diffstat (limited to 'abi/wire.zig')
| -rw-r--r-- | abi/wire.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/abi/wire.zig b/abi/wire.zig index cf3daf2e..b2d32033 100644 --- a/abi/wire.zig +++ b/abi/wire.zig @@ -194,7 +194,7 @@ pub const ServerMsg = union(ServerTag) { /// dump that follows is, and the session's offset from UTC (a replica /// guesses the session's time of day). A far client is told how many /// blobs the dump holds (`blobs`). - welcome: struct { pid: u32, session: []const u8, client: u16 = 0, view: u8 = 0, dump_len: u64 = 0, gmtoff: i32 = 0, digest: u64 = 0, semantics: u64 = 0, blobs: u32 = 0 }, + welcome: struct { pid: u32, session: []const u8, client: u16 = 0, view: pardes.Pardes.View.Id = .at(0), dump_len: u64 = 0, gmtoff: i32 = 0, digest: u64 = 0, semantics: u64 = 0, blobs: u32 = 0 }, refused: []const u8, pong: u64, dump: []const u8, @@ -223,7 +223,7 @@ pub fn decodeServer(tag: u8, payload: []const u8) Error!ServerMsg { .pid = try r.takeInt(u32, .little), .session = try r.take(try r.takeInt(u16, .little)), .client = try r.takeInt(u16, .little), - .view = try r.takeByte(), + .view = .at(try r.takeByte()), .dump_len = try r.takeInt(u64, .little), .gmtoff = try r.takeInt(i32, .little), .digest = try r.takeInt(u64, .little), @@ -252,7 +252,7 @@ pub fn encodeServer(out: []u8, msg: ServerMsg) Error![]const u8 { try w.writeInt(u32, h.pid, .little); try putSlice16(&w, h.session); try w.writeInt(u16, h.client, .little); - try w.writeByte(h.view); + try w.writeByte(h.view.index()); try w.writeInt(u64, h.dump_len, .little); try w.writeInt(i32, h.gmtoff, .little); try w.writeInt(u64, h.digest, .little); |
