From: Ian Jackson Date: Sat, 3 Apr 2021 17:03:21 +0000 (+0100) Subject: api: Provide Client and ClientSequence to api ops X-Git-Tag: otter-0.5.0~235 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d9bc5ced63c2934f5c1fb807f5bc8e15f83eb602;p=otter.git api: Provide Client and ClientSequence to api ops Some that want to do sophisticated things might want it. I thought "organise" did but in fact that needs to be done a different way. Keep this change though; it may come in handy. Signed-off-by: Ian Jackson --- diff --git a/daemon/api.rs b/daemon/api.rs index f7b78ecd..e72991f1 100644 --- a/daemon/api.rs +++ b/daemon/api.rs @@ -141,7 +141,8 @@ fn api_piece_op(form: Json>) form.op.check_held(gpc,player)?; let update = form.op.op_complex(ApiPieceOpArgs { - ioccults, gs, player, piece, ipieces, ipc, + ioccults, gs, player, piece, ipieces, ipc, client, + cseq: form.cseq, ig: &iad.gref, to_recalculate: &mut to_recalculate, })?; diff --git a/src/gamestate.rs b/src/gamestate.rs index f58c83ff..4baf9b30 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -231,6 +231,8 @@ pub struct ApiPieceOpArgs<'a> { pub player: PlayerId, pub piece: PieceId, pub ipc: &'a IPiece, + pub cseq: ClientSequence, + pub client: ClientId, } #[derive(Debug)]