From b372b992a20210e2531cd9e8b535d20699c15aa9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 29 Apr 2021 00:54:25 +0100 Subject: [PATCH] cmdlistener: Move handling of expand We're going to want this to interact with resp Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index f6744340..41010c0f 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -970,11 +970,6 @@ fn execute_for_game<'cs, 'igr, 'ig: 'igr>( let (updates, resp, unprepared, expand, ig) = execute_game_insn(cs, ag, igu, insn, &who, &mut to_permute)?; - if ! expand.is_empty() { - let mut expand: VecDeque<_> = expand.into(); - expand.append(&mut insns); - insns = expand; - } let st = uh_auth.get_or_insert_with(||{ let auth = Authorisation::authorised(&*ig.name); let uh = UpdateHandler::from_how(how); @@ -982,6 +977,11 @@ fn execute_for_game<'cs, 'igr, 'ig: 'igr>( }); st.have_deleted |= was_delete; st.uh.accumulate(ig, updates)?; + if ! expand.is_empty() { + let mut expand: VecDeque<_> = expand.into(); + expand.append(&mut insns); + insns = expand; + } responses.push(resp); if let Some(unprepared) = unprepared { st.flush(ig,how,&who)?; -- 2.30.2