implement SHUTDOWN sync
authorVolker Birk <vb@pep-project.org>
Fri, 30 Aug 2019 09:07:13 +0200
branchsync
changeset 4053a1b219054c9b
parent 4029 07fffddd4354
child 4054 066c28e72bd6
implement SHUTDOWN
src/fsm_common.h
sync/cond_act_sync.yml2
     1.1 --- a/src/fsm_common.h	Thu Aug 29 19:36:13 2019 +0200
     1.2 +++ b/src/fsm_common.h	Fri Aug 30 09:07:13 2019 +0200
     1.3 @@ -39,6 +39,10 @@
     1.4      Extra = 128 // messages will be below this ID
     1.5  };
     1.6  
     1.7 +enum {
     1.8 +    SHUTDOWN = 0
     1.9 +};
    1.10 +
    1.11  #ifdef __cplusplus
    1.12  }
    1.13  #endif
     2.1 --- a/sync/cond_act_sync.yml2	Thu Aug 29 19:36:13 2019 +0200
     2.2 +++ b/sync/cond_act_sync.yml2	Fri Aug 30 09:07:13 2019 +0200
     2.3 @@ -537,4 +537,14 @@
     2.4      session->sync_state.keysync.is_group = false;
     2.5  ||
     2.6  
     2.7 -action disable;
     2.8 +action disable
     2.9 +||
    2.10 +    leave_device_group(session);
    2.11 +    // ignore the result, disable anyway
    2.12 +
    2.13 +    if (!session->inject_sync_event)
    2.14 +        return PEP_SYNC_NO_INJECT_CALLBACK;
    2.15 +
    2.16 +    session->inject_sync_event(SHUTDOWN, NULL);
    2.17 +||
    2.18 +