make temporary state visible in code sync
authorVolker Birk <vb@pep-project.org>
Wed, 29 May 2019 16:15:30 +0200
branchsync
changeset 37687fc561191d28
parent 3767 11a9d0f61073
child 3772 f4d6efa63ee1
make temporary state visible in code
sync/cond_act_sync.yml2
sync/gen_message_func.ysl2
     1.1 --- a/sync/cond_act_sync.yml2	Wed May 29 16:11:32 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Wed May 29 16:15:30 2019 +0200
     1.3 @@ -147,7 +147,7 @@
     1.4      // store a copy of this challenge
     1.5      call "copy_UUID" {
     1.6          with "src" > &session->own_sync_state.challenge
     1.7 -        with "dst" > &session->sync_state.comm_partner.challenge
     1.8 +        with "dst" > &session->sync_state.temp.challenge
     1.9      }
    1.10  }
    1.11  
    1.12 @@ -157,7 +157,7 @@
    1.13  }
    1.14  
    1.15  action useOwnChallenge call "copy_UUID" {
    1.16 -    with "src" > &session->sync_state.comm_partner.challenge
    1.17 +    with "src" > &session->sync_state.temp.challenge
    1.18      with "dst" > &session->own_sync_state.challenge
    1.19  }
    1.20  
     2.1 --- a/sync/gen_message_func.ysl2	Wed May 29 16:11:32 2019 +0200
     2.2 +++ b/sync/gen_message_func.ysl2	Wed May 29 16:15:30 2019 +0200
     2.3 @@ -42,13 +42,16 @@
     2.4      // state about our communication partner
     2.5  
     2.6      struct comm_partner_state_s {
     2.7 -        // intermediate store own challenge
     2.8 -        TID_t challenge;
     2.9 -
    2.10          // transport data
    2.11          pEp_identity *from;
    2.12          char *signature_fpr;
    2.13      } comm_partner;
    2.14 +
    2.15 +    struct temporary_state_s {
    2.16 +        // intermediate state / clipboard
    2.17 +        TID_t challenge;
    2.18 +    } temp;
    2.19 +
    2.20      `` apply "fsm", mode=state
    2.21  };
    2.22