chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Jul 2020 12:48:31 +0000 (13:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Jul 2020 12:48:31 +0000 (13:48 +0100)
src/bin/server.rs
src/global.rs
src/sse.rs

index 353c4962e5769063f2440830e89573d5982befef..4169e06bb181d21f388b5a2563572393cb163518 100644 (file)
@@ -161,12 +161,12 @@ fn api_grab(form : Json<ApiGrab>) -> 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());
index 8c22f6c57926761ceb6fbd8fbca714958d000672..6c5603b905f0a2b1e76a93a4810b7f75be23d324 100644 (file)
@@ -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,
 }
index 5f764aeef6c90fe80c4a0c7b1a93a616d4154aab..7e83ca5aa549cea38cfd62127881266d577b77bf 100644 (file)
@@ -49,7 +49,7 @@ struct UpdateReader {
 #[derive(Serialize)]
 struct RecordedConfirmation {
   gen : Generation,
-  piece : PieceId,
+  piece : VisiblePieceId,
   cseq : ClientSequence,
 }