notify the app sync
authorVolker Birk <vb@pep.foundation>
Thu, 30 Aug 2018 04:33:59 +0200
branchsync
changeset 2913b2c2eed5be7a
parent 2912 13a2b54020b7
child 2914 f14346676e85
notify the app
sync/cond_act_sync.yml2
sync/gen_actions.ysl2
sync/gen_statemachine.ysl2
sync/sync.fsm
     1.1 --- a/sync/cond_act_sync.yml2	Thu Aug 30 02:43:06 2018 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Thu Aug 30 04:33:59 2018 +0200
     1.3 @@ -152,6 +152,9 @@
     1.4  action showGroupedHandshake
     1.5      call "show_handshake" with "type" > SYNC_NOTIFY_INIT_ADD_OTHER_DEVICE
     1.6  
     1.7 +action KeySyncTimeoutHandler
     1.8 +    call "show_handshake" with "type" > SYNC_NOTIFY_TIMEOUT
     1.9 +
    1.10  action saveGroupKeys
    1.11  ||
    1.12      identity_list *il = IdentityList_to_identity_list(&session->sync_state.keysync.identities, NULL);
     2.1 --- a/sync/gen_actions.ysl2	Thu Aug 30 02:43:06 2018 +0200
     2.2 +++ b/sync/gen_actions.ysl2	Thu Aug 30 04:33:59 2018 +0200
     2.3 @@ -60,7 +60,8 @@
     2.4  
     2.5              ||
     2.6              apply "func:distinctName(//condition)", 0;
     2.7 -            apply "func:distinctName(//action[not(starts-with(@name, 'send'))])", 0;
     2.8 +            apply "func:distinctName(//action)", 0;
     2.9 +            callTimeoutHandler KeySync;
    2.10          }
    2.11      }
    2.12  
     3.1 --- a/sync/gen_statemachine.ysl2	Thu Aug 30 02:43:06 2018 +0200
     3.2 +++ b/sync/gen_statemachine.ysl2	Thu Aug 30 04:33:59 2018 +0200
     3.3 @@ -553,6 +553,7 @@
     3.4                      if (_«@name»_timeout(state)) {
     3.5                          session->«yml:lcase(../@name)»_state.«yml:lcase(@name)».state = Init;
     3.6                          event = Init;
     3.7 +                        `` if "action" |>>>>> «action/@name»(session);
     3.8                      }
     3.9                      break;
    3.10                  
     4.1 --- a/sync/sync.fsm	Thu Aug 30 02:43:06 2018 +0200
     4.2 +++ b/sync/sync.fsm	Thu Aug 30 04:33:59 2018 +0200
     4.3 @@ -12,6 +12,8 @@
     4.4  
     4.5      fsm KeySync 1 {
     4.6          version 1, 2;
     4.7 +        action KeySyncTimeoutHandler;
     4.8 +
     4.9          state InitState {
    4.10              on Init {
    4.11                  if deviceGrouped