types fix
authorVolker Birk <vb@pep-project.org>
Thu, 12 May 2016 10:45:54 +0200
changeset 6083bf69b382303
parent 607 52b16e047181
child 609 a22a400611ca
types fix
src/sync_fsm.c
sync/gen_statemachine.ysl2
     1.1 --- a/src/sync_fsm.c	Thu May 12 10:40:31 2016 +0200
     1.2 +++ b/src/sync_fsm.c	Thu May 12 10:45:54 2016 +0200
     1.3 @@ -2,7 +2,10 @@
     1.4  
     1.5  #include "pEpEngine.h"
     1.6  
     1.7 -typedef union _param { const pEp_identity *partner; const stringlist_t *keylist; } param_t;
     1.8 +// types
     1.9 +
    1.10 +typedef pEp_identity * Identity;
    1.11 +typedef union _param { const Identity partner; const stringlist_t *keylist; } param_t;
    1.12  
    1.13  // error values
    1.14  
    1.15 @@ -37,13 +40,13 @@
    1.16  
    1.17  // actions
    1.18  
    1.19 -void sendBeacon(const pEp_identity *partner);
    1.20 -void sendHandshakeRequest(const pEp_identity *partner);
    1.21 -void showHandshake(const pEp_identity *partner);
    1.22 -void reject(const pEp_identity *partner);
    1.23 -void storeGroupKeys(const pEp_identity *partner);
    1.24 -void sendOwnKeys(const pEp_identity *partner);
    1.25 -void transmitGroupKeys(const pEp_identity *partner);
    1.26 +void sendBeacon(const Identity partner);
    1.27 +void sendHandshakeRequest(const Identity partner);
    1.28 +void showHandshake(const Identity partner);
    1.29 +void reject(const Identity partner);
    1.30 +void storeGroupKeys(const Identity partner);
    1.31 +void sendOwnKeys(const Identity partner);
    1.32 +void transmitGroupKeys(const Identity partner);
    1.33  
    1.34  // decoders
    1.35  
    1.36 @@ -62,7 +65,7 @@
    1.37  DeviceState_state fsm_DeviceState(
    1.38          DeviceState_state state,
    1.39          DeviceState_event event,
    1.40 -        const pEp_identity *partner
    1.41 +        const Identity partner
    1.42      )
    1.43  {
    1.44      switch (state) {
     2.1 --- a/sync/gen_statemachine.ysl2	Thu May 12 10:40:31 2016 +0200
     2.2 +++ b/sync/gen_statemachine.ysl2	Thu May 12 10:45:54 2016 +0200
     2.3 @@ -17,7 +17,10 @@
     2.4  
     2.5      #include "pEpEngine.h"
     2.6  
     2.7 -    typedef union _param { const pEp_identity *partner; const stringlist_t *keylist; } param_t;
     2.8 +    // types
     2.9 +
    2.10 +    typedef pEp_identity * Identity;
    2.11 +    typedef union _param { const Identity partner; const stringlist_t *keylist; } param_t;
    2.12  
    2.13      // error values
    2.14  
    2.15 @@ -40,7 +43,7 @@
    2.16  
    2.17      // actions
    2.18  
    2.19 -    `` for "set:distinct(state/event//action/@name)" | void «.»(const pEp_identity *partner);
    2.20 +    `` for "set:distinct(state/event//action/@name)" | void «.»(const Identity partner);
    2.21  
    2.22      // decoders
    2.23  
    2.24 @@ -55,7 +58,7 @@
    2.25      «@name»_state fsm_«@name»(
    2.26              «@name»_state state,
    2.27              «@name»_event event,
    2.28 -            const pEp_identity *partner
    2.29 +            const Identity partner
    2.30          )
    2.31      {
    2.32          switch (state) {