From 7ab4041aafdd67accc5a6eb55caa4c38d83cd640 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 5 Jul 2020 13:48:31 +0100 Subject: [PATCH] wip --- src/bin/server.rs | 4 ++-- src/global.rs | 2 +- src/sse.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index 353c4962..4169e06b 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -161,12 +161,12 @@ fn api_grab(form : Json) -> impl response::Responder<'static> { let update = PreparedUpdate { gen, client, - piece, + piece : form.piece, // split view needs modified value! cseq : form.cseq, json, }; let update = Arc::new(update); - // split vie wthing would go here + // split vie wthing would go here, see also update.piece p.gen_lastclient = gen; for (_tplayer, tplupdates) in &mut g.updates { tplupdates.log.push_back(update.clone()); diff --git a/src/global.rs b/src/global.rs index 8c22f6c5..6c5603b9 100644 --- a/src/global.rs +++ b/src/global.rs @@ -28,7 +28,7 @@ impl Client { pub struct PreparedUpdate { pub gen : Generation, pub client : ClientId, - pub piece : PieceId, + pub piece : VisiblePieceId, pub cseq : ClientSequence, pub json : String, } diff --git a/src/sse.rs b/src/sse.rs index 5f764aee..7e83ca5a 100644 --- a/src/sse.rs +++ b/src/sse.rs @@ -49,7 +49,7 @@ struct UpdateReader { #[derive(Serialize)] struct RecordedConfirmation { gen : Generation, - piece : PieceId, + piece : VisiblePieceId, cseq : ClientSequence, } -- 2.30.2