Browse Source

adding sending

doc_update_sequoia
Volker Birk 6 years ago
parent
commit
940f9ece25
12 changed files with 284 additions and 78 deletions
  1. +3
    -0
      asn.1/devicegroup.asn1
  2. +3
    -0
      src/pEpEngine.h
  3. +3
    -0
      src/pEp_internal.h
  4. +3
    -5
      src/sync.c
  5. +1
    -0
      src/sync.h
  6. +132
    -10
      src/sync_actions.c
  7. +10
    -5
      src/sync_driver.c
  8. +16
    -15
      src/sync_fsm.c
  9. +17
    -9
      src/sync_fsm.h
  10. +3
    -3
      sync/Makefile
  11. +53
    -26
      sync/gen_actions_skeleton.ysl2
  12. +40
    -5
      sync/gen_statemachine.ysl2

+ 3
- 0
asn.1/devicegroup.asn1 View File

@ -8,17 +8,20 @@ IMPORTS Identity, KeyList, Header FROM PEP;
Beacon ::= SEQUENCE {
header Header,
state INTEGER,
me Identity
}
HandshakeRequest ::= SEQUENCE {
header Header,
state INTEGER,
me Identity,
partner Identity
}
OwnKeys ::= SEQUENCE {
header Header,
state INTEGER,
me Identity,
keylist KeyList
}


+ 3
- 0
src/pEpEngine.h View File

@ -67,6 +67,9 @@ typedef enum {
PEP_PHRASE_NOT_FOUND = 0x0701,
PEP_SEND_FUNCTION_NOT_REGISTERED = 0x0801,
PEP_CANNOT_ENCODE = 0x0802,
PEP_COMMIT_FAILED = 0xff01,
PEP_CANNOT_CREATE_TEMP_FILE = -5,


+ 3
- 0
src/pEp_internal.h View File

@ -122,6 +122,9 @@ typedef struct _pEpSession {
messageToSend_t messageToSend;
showHandshake_t showHandshake;
// sync state machine
DeviceState_state sync_state;
// runtime config
bool passive_mode;


+ 3
- 5
src/sync.c View File

@ -3,8 +3,6 @@
#include <memory.h>
#include <assert.h>
#include "sync_fsm.h"
DYNAMIC_API PEP_STATUS register_sync_callbacks(
PEP_SESSION session,
@ -37,13 +35,13 @@ DYNAMIC_API PEP_STATUS deliverHandshakeResult(
switch (result) {
case SYNC_HANDSHAKE_CANCEL:
fsm_DeviceState_inject(session, Cancel);
fsm_DeviceState_inject(session, Cancel, NULL, 0);
break;
case SYNC_HANDSHAKE_ACCEPTED:
fsm_DeviceState_inject(session, HandshakeAccepted);
fsm_DeviceState_inject(session, HandshakeAccepted, NULL, 0);
break;
case SYNC_HANDSHAKE_REJECTED:
fsm_DeviceState_inject(session, HandshakeRejected);
fsm_DeviceState_inject(session, HandshakeRejected, NULL, 0);
break;
default:
return PEP_ILLEGAL_VALUE;


+ 1
- 0
src/sync.h View File

@ -1,6 +1,7 @@
#pragma once
#include "message.h"
#include "sync_fsm.h"
// this module is for being used WITHOUT the Transport API in transport.h


+ 132
- 10
src/sync_actions.c View File

@ -1,8 +1,11 @@
// Actions for DeviceState state machine
#include <assert.h>
#include "pEp_internal.h"
#include "keymanagement.h"
#include "message.h"
#include "sync_fsm.h"
#include "baseprotocol.h"
#include "map_asn1.h"
#include "../asn.1/Beacon.h"
#include "../asn.1/HandshakeRequest.h"
@ -13,21 +16,33 @@
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) (must be NULL)
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS sendBeacon(PEP_SESSION session, const Identity partner)
PEP_STATUS sendBeacon(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
Beacon_t *msg = NULL;
char *payload = NULL;
message *_message = NULL;
assert(session);
assert(!partner);
if (!(session && !partner))
return PEP_ILLEGAL_VALUE;
Beacon_t *msg = (Beacon_t *) calloc(1, sizeof(Beacon_t));
assert(session->messageToSend);
if (!session->messageToSend)
return PEP_SEND_FUNCTION_NOT_REGISTERED;
msg = (Beacon_t *) calloc(1, sizeof(Beacon_t));
assert(msg);
if (!msg)
goto enomem;
@ -38,6 +53,8 @@ PEP_STATUS sendBeacon(PEP_SESSION session, const Identity partner)
goto error;
msg->header.sequence = (long) seq;
msg->state = (long) state;
pEp_identity *me = new_identity(NULL, NULL, NULL, NULL);
if (!me)
goto enomem;
@ -47,12 +64,31 @@ PEP_STATUS sendBeacon(PEP_SESSION session, const Identity partner)
if (Identity_from_Struct(me, &msg->me) == NULL)
goto enomem;
ssize_t size = uper_encode_to_new_buffer(&asn_DEF_HandshakeRequest,
NULL, msg, (void **) &payload);
if (size == -1) {
status = PEP_CANNOT_ENCODE;
goto error;
}
status = prepare_message(me, partner, payload, size, &_message);
if (status != PEP_STATUS_OK)
goto error;
payload = NULL;
status = session->messageToSend(session->sync_obj, _message);
free_message(_message);
ASN_STRUCT_FREE(asn_DEF_Beacon, msg);
return status;
enomem:
status = PEP_OUT_OF_MEMORY;
error:
ASN_STRUCT_FREE(asn_DEF_Beacon, msg);
free(payload);
free_message(_message);
return status;
}
@ -61,21 +97,33 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) partner in sync
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS sendHandshakeRequest(PEP_SESSION session, const Identity partner)
PEP_STATUS sendHandshakeRequest(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
HandshakeRequest_t *msg = NULL;
char *payload = NULL;
message *_message = NULL;
assert(session);
assert(partner);
if (!(session && partner))
return PEP_ILLEGAL_VALUE;
HandshakeRequest_t *msg = (HandshakeRequest_t *) calloc(1, sizeof(HandshakeRequest_t));
assert(session->messageToSend);
if (!session->messageToSend)
return PEP_SEND_FUNCTION_NOT_REGISTERED;
msg = (HandshakeRequest_t *) calloc(1, sizeof(HandshakeRequest_t));
assert(msg);
if (!msg)
goto enomem;
@ -86,6 +134,8 @@ PEP_STATUS sendHandshakeRequest(PEP_SESSION session, const Identity partner)
goto error;
msg->header.sequence = (long) seq;
msg->state = (long) state;
pEp_identity *me = new_identity(NULL, NULL, NULL, NULL);
if (!me)
goto enomem;
@ -98,12 +148,31 @@ PEP_STATUS sendHandshakeRequest(PEP_SESSION session, const Identity partner)
if (Identity_from_Struct(partner, &msg->partner) == NULL)
goto enomem;
ssize_t size = uper_encode_to_new_buffer(&asn_DEF_HandshakeRequest,
NULL, msg, (void **) &payload);
if (size == -1) {
status = PEP_CANNOT_ENCODE;
goto error;
}
status = prepare_message(me, partner, payload, size, &_message);
if (status != PEP_STATUS_OK)
goto error;
payload = NULL;
status = session->messageToSend(session->sync_obj, _message);
free_message(_message);
ASN_STRUCT_FREE(asn_DEF_HandshakeRequest, msg);
return status;
enomem:
status = PEP_OUT_OF_MEMORY;
error:
ASN_STRUCT_FREE(asn_DEF_HandshakeRequest, msg);
free(payload);
free_message(_message);
return status;
}
@ -112,12 +181,17 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) partner in sync
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS showHandshake(PEP_SESSION session, const Identity partner)
PEP_STATUS showHandshake(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
@ -143,12 +217,17 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) partner in sync
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS reject(PEP_SESSION session, const Identity partner)
PEP_STATUS reject(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
@ -174,12 +253,17 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) partner in sync
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS storeGroupKeys(PEP_SESSION session, const Identity partner)
PEP_STATUS storeGroupKeys(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
@ -205,21 +289,33 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) (must be NULL)
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS sendOwnKeys(PEP_SESSION session, const Identity partner)
PEP_STATUS sendOwnKeys(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
OwnKeys_t *msg = NULL;
char *payload = NULL;
message *_message = NULL;
assert(session);
assert(!partner);
if (!(session && !partner))
return PEP_ILLEGAL_VALUE;
OwnKeys_t *msg = (OwnKeys_t *) calloc(1, sizeof(OwnKeys_t));
assert(session->messageToSend);
if (!session->messageToSend)
return PEP_SEND_FUNCTION_NOT_REGISTERED;
msg = (OwnKeys_t *) calloc(1, sizeof(OwnKeys_t));
assert(msg);
if (!msg)
goto enomem;
@ -230,6 +326,8 @@ PEP_STATUS sendOwnKeys(PEP_SESSION session, const Identity partner)
goto error;
msg->header.sequence = (long) seq;
msg->state = (long) state;
pEp_identity *me = new_identity(NULL, NULL, NULL, NULL);
if (!me)
goto enomem;
@ -246,12 +344,31 @@ PEP_STATUS sendOwnKeys(PEP_SESSION session, const Identity partner)
if (KeyList_from_stringlist(sl, &msg->keylist) == NULL)
goto enomem;
ssize_t size = uper_encode_to_new_buffer(&asn_DEF_HandshakeRequest,
NULL, msg, (void **) &payload);
if (size == -1) {
status = PEP_CANNOT_ENCODE;
goto error;
}
status = prepare_message(me, partner, payload, size, &_message);
if (status != PEP_STATUS_OK)
goto error;
payload = NULL;
status = session->messageToSend(session->sync_obj, _message);
free_message(_message);
ASN_STRUCT_FREE(asn_DEF_OwnKeys, msg);
return status;
enomem:
status = PEP_OUT_OF_MEMORY;
error:
ASN_STRUCT_FREE(asn_DEF_OwnKeys, msg);
free(payload);
free_message(_message);
return status;
}
@ -260,12 +377,17 @@ error:
//
// params:
// session (in) session handle
// state (in) state the state machine is in
// partner (in) partner in sync
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS transmitGroupKeys(PEP_SESSION session, const Identity partner)
PEP_STATUS transmitGroupKeys(
PEP_SESSION session,
DeviceState_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;


+ 10
- 5
src/sync_driver.c View File

@ -1,17 +1,22 @@
// Driver for DeviceState state machine
#include <assert.h>
#include "sync_fsm.h"
#include "pEp_internal.h"
PEP_STATUS fsm_DeviceState_inject(PEP_SESSION session, DeviceState_event event)
PEP_STATUS fsm_DeviceState_inject(
PEP_SESSION session,
DeviceState_event event,
Identity partner,
DeviceState_state state_partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
static DeviceState_state state = InitState;
static Identity partner = NULL;
session->sync_state = InitState;
session->sync_state = fsm_DeviceState(session, session->sync_state,
event, partner, state_partner);
state = fsm_DeviceState(session, state, event, partner);
return status;
}

+ 16
- 15
src/sync_fsm.c View File

@ -6,7 +6,8 @@ DeviceState_state fsm_DeviceState(
PEP_SESSION session,
DeviceState_state state,
DeviceState_event event,
const Identity partner
const Identity partner,
DeviceState_state state_partner
)
{
switch (state) {
@ -22,16 +23,16 @@ DeviceState_state fsm_DeviceState(
case Sole:
switch (event) {
case KeyGen:
sendBeacon(session, NULL);
sendBeacon(session, state, NULL);
break;
case CannotDecrypt:
sendBeacon(session, NULL);
sendBeacon(session, state, NULL);
break;
case Beacon:
sendHandshakeRequest(session, partner);
sendHandshakeRequest(session, state, partner);
break;
case HandshakeRequest:
sendHandshakeRequest(session, partner);
sendHandshakeRequest(session, state, partner);
return HandshakingSole;
default:
return invalid_event;
@ -41,10 +42,10 @@ DeviceState_state fsm_DeviceState(
case HandshakingSole:
switch (event) {
case Init:
showHandshake(session, partner);
showHandshake(session, state, partner);
break;
case HandshakeRejected:
reject(session, partner);
reject(session, state, partner);
return Sole;
case HandshakeAccepted:
return WaitForGroupKeys;
@ -56,12 +57,12 @@ DeviceState_state fsm_DeviceState(
case WaitForGroupKeys:
switch (event) {
case ReceiveGroupKeys:
storeGroupKeys(session, partner);
storeGroupKeys(session, state, partner);
return Grouped;
case Cancel:
return Sole;
case Reject:
reject(session, partner);
reject(session, state, partner);
return Sole;
default:
return invalid_event;
@ -71,20 +72,20 @@ DeviceState_state fsm_DeviceState(
case Grouped:
switch (event) {
case KeyGen:
sendOwnKeys(session, NULL);
sendOwnKeys(session, state, NULL);
break;
case HandshakeRequest:
sendHandshakeRequest(session, partner);
showHandshake(session, partner);
sendHandshakeRequest(session, state, partner);
showHandshake(session, state, partner);
break;
case HandshakeRejected:
reject(session, partner);
reject(session, state, partner);
break;
case HandshakeAccepted:
transmitGroupKeys(session, partner);
transmitGroupKeys(session, state, partner);
break;
case Reject:
reject(session, NULL);
reject(session, state, NULL);
break;
default:
return invalid_event;


+ 17
- 9
src/sync_fsm.h View File

@ -23,6 +23,7 @@ typedef enum _fsm_error {
// states
typedef enum _DeviceState_state {
DeviceState_state_NONE = 0,
InitState,
Sole,
HandshakingSole,
@ -33,6 +34,7 @@ typedef enum _DeviceState_state {
// events
typedef enum _DeviceState_event {
DeviceState_event_NONE = 0,
Init,
KeyGen,
CannotDecrypt,
@ -47,13 +49,13 @@ typedef enum _DeviceState_event {
// actions
PEP_STATUS sendBeacon(PEP_SESSION session, const Identity partner);
PEP_STATUS sendHandshakeRequest(PEP_SESSION session, const Identity partner);
PEP_STATUS showHandshake(PEP_SESSION session, const Identity partner);
PEP_STATUS reject(PEP_SESSION session, const Identity partner);
PEP_STATUS storeGroupKeys(PEP_SESSION session, const Identity partner);
PEP_STATUS sendOwnKeys(PEP_SESSION session, const Identity partner);
PEP_STATUS transmitGroupKeys(PEP_SESSION session, const Identity partner);
PEP_STATUS sendBeacon(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS sendHandshakeRequest(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS showHandshake(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS reject(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS storeGroupKeys(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS sendOwnKeys(PEP_SESSION session, DeviceState_state state, const Identity partner);
PEP_STATUS transmitGroupKeys(PEP_SESSION session, DeviceState_state state, const Identity partner);
// state machine
@ -61,12 +63,18 @@ DeviceState_state fsm_DeviceState(
PEP_SESSION session,
DeviceState_state state,
DeviceState_event event,
const Identity partner
const Identity partner,
DeviceState_state state_partner
);
// driver
PEP_STATUS fsm_DeviceState_inject(PEP_SESSION session, DeviceState_event event);
PEP_STATUS fsm_DeviceState_inject(
PEP_SESSION session,
DeviceState_event event,
Identity partner,
DeviceState_state state_partner
);
#ifdef __cplusplus
}


+ 3
- 3
sync/Makefile View File

@ -2,9 +2,9 @@ include ../Makefile.conf
all: ../src/sync_fsm.c
skeleton: ../src/sync_actions.c
skeleton: ../src/sync_actions.c.skeleton
../src/sync_actions.c: sync.fsm gen_actions_skeleton.ysl2 fsm.yml2 functions.ysl2
../src/sync_actions.c.skeleton: sync.fsm gen_actions_skeleton.ysl2 fsm.yml2 functions.ysl2
$(YML2PROC) -y gen_actions_skeleton.ysl2 $< -o $@
../src/sync_fsm.c: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2
@ -13,4 +13,4 @@ skeleton: ../src/sync_actions.c
.PHONY: clean
clean:
rm -f *.xml *.xsl ../src/sync_fsm.*
rm -f *.xml *.xsl ../src/sync_fsm.* ../src/*.skeleton

+ 53
- 26
sync/gen_actions_skeleton.ysl2 View File

@ -10,47 +10,34 @@ tstylesheet {
include ./functions.ysl2
template "/protocol/fsm" {
document "../src/sync_driver.c", "text"
||
// Driver for «@name» state machine
#include <assert.h>
#include "sync_fsm.h"
PEP_STATUS fsm_«@name»_inject(PEP_SESSION session, «@name»_event event)
{
PEP_STATUS status = PEP_STATUS_OK;
static «@name»_state state = InitState;
static Identity partner = NULL;
state = fsm_«@name»(session, state, event, partner);
return status;
}
||
||
`` const "name", "@name"
// Actions for «@name» state machine
#include <assert.h>
#include "pEp_internal.h"
#include "keymanagement.h"
#include "message.h"
#include "sync_fsm.h"
#include "baseprotocol.h"
#include "map_asn1.h"
`` for "func:distinctName(//action)" if "substring(@name, 1, 4) = 'send'" | #include "../asn.1/«substring(@name, 5, 255)».h"
`` for "func:distinctName(//action)" call "action" with "action", ".";
`` for "func:distinctName(//action)" call "action" with "action", ".", with "fsm", "$name";
||
}
function "action" {
param "action";
param "fsm";
choose {
when "substring($action/@name, 1, 4) = 'send'"
call "send_action" with "action", "$action";
call "send_action" with "action", "$action",
with "fsm", "$fsm";
otherwise
call "other_action" with "action", "$action";
call "other_action" with "action", "$action",
with "fsm", "$fsm";
}
}
@ -75,6 +62,7 @@ tstylesheet {
function "other_action" {
param "action";
param "fsm";
||
@ -82,13 +70,18 @@ tstylesheet {
//
// params:
// session (in) session handle
// state (in) state the state machine is in
`` if "parm" | // partner (in) partner in sync
`` if "not(parm)" | // partner (in) (must be NULL)
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS «$action/@name»(PEP_SESSION session, const Identity partner)
PEP_STATUS «$action/@name»(
PEP_SESSION session,
«$fsm»_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
@ -111,6 +104,7 @@ tstylesheet {
function "send_action" {
param "action";
param "fsm";
const "name", "substring($action/@name, 5, 255)";
||
@ -119,19 +113,31 @@ tstylesheet {
//
// params:
// session (in) session handle
// state (in) state the state machine is in
`` if "parm" | // partner (in) partner in sync
`` if "not(parm)" | // partner (in) (must be NULL)
//
// returns:
// PEP_STATUS_OK or any other value on error
PEP_STATUS «$action/@name»(PEP_SESSION session, const Identity partner)
PEP_STATUS «$action/@name»(
PEP_SESSION session,
«$fsm»_state state,
const Identity partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
«$name»_t *msg = NULL;
char *payload = NULL;
message *_message = NULL;
`` call "paramcheck" with "partner", "parm/partner";
«$name»_t *msg = («$name»_t *) calloc(1, sizeof(«$name»_t));
assert(session->messageToSend);
if (!session->messageToSend)
return PEP_SEND_FUNCTION_NOT_REGISTERED;
msg = («$name»_t *) calloc(1, sizeof(«$name»_t));
assert(msg);
if (!msg)
goto enomem;
@ -142,6 +148,8 @@ tstylesheet {
goto error;
msg->header.sequence = (long) seq;
msg->state = (long) state;
pEp_identity *me = new_identity(NULL, NULL, NULL, NULL);
if (!me)
goto enomem;
@ -160,12 +168,31 @@ tstylesheet {
`` if "$name='OwnKeys'"|> if (KeyList_from_stringlist(sl, &msg->keylist) == NULL)
`` if "$name='OwnKeys'"|>> goto enomem;
ssize_t size = uper_encode_to_new_buffer(&asn_DEF_HandshakeRequest,
NULL, msg, (void **) &payload);
if (size == -1) {
status = PEP_CANNOT_ENCODE;
goto error;
}
status = prepare_message(me, partner, payload, size, &_message);
if (status != PEP_STATUS_OK)
goto error;
payload = NULL;
status = session->messageToSend(session->sync_obj, _message);
free_message(_message);
ASN_STRUCT_FREE(asn_DEF_«$name», msg);
return status;
enomem:
status = PEP_OUT_OF_MEMORY;
error:
ASN_STRUCT_FREE(asn_DEF_«$name», msg);
free(payload);
free_message(_message);
return status;
}


+ 40
- 5
sync/gen_statemachine.ysl2 View File

@ -37,18 +37,21 @@ tstylesheet {
// states
typedef enum _«@name»_state {
«@name»_state_NONE = 0,
`` for "func:distinctName(state)" |> «@name»`if "position()!=last()" > , `
} «@name»_state;
// events
typedef enum _«@name»_event {
«@name»_event_NONE = 0,
`` for "func:distinctName(state/event)" |> «@name»`if "position()!=last()" > , `
} «@name»_event;
// actions
`` for "func:distinctName(//action)" | PEP_STATUS «@name»(PEP_SESSION session, const Identity partner);
`` const "name", "@name"
`` for "func:distinctName(//action)" | PEP_STATUS «@name»(PEP_SESSION session, «$name»_state state, const Identity partner);
// state machine
@ -56,17 +59,48 @@ tstylesheet {
PEP_SESSION session,
«@name»_state state,
«@name»_event event,
const Identity partner
const Identity partner,
«@name»_state state_partner
);
// driver
PEP_STATUS fsm_«@name»_inject(PEP_SESSION session, «@name»_event event);
PEP_STATUS fsm_«@name»_inject(
PEP_SESSION session,
«@name»_event event,
Identity partner,
«@name»_state state_partner
);
#ifdef __cplusplus
}
#endif
||
document "../src/sync_driver.c", "text"
||
// Driver for «@name» state machine
#include <assert.h>
#include "pEp_internal.h"
PEP_STATUS fsm_«@name»_inject(
PEP_SESSION session,
«@name»_event event,
Identity partner,
«@name»_state state_partner
)
{
PEP_STATUS status = PEP_STATUS_OK;
session->sync_state = InitState;
session->sync_state = fsm_«@name»(session, session->sync_state,
event, partner, state_partner);
return status;
}
||
||
#include "sync_fsm.h"
@ -77,7 +111,8 @@ tstylesheet {
PEP_SESSION session,
«@name»_state state,
«@name»_event event,
const Identity partner
const Identity partner,
«@name»_state state_partner
)
{
switch (state) {
@ -113,7 +148,7 @@ tstylesheet {
template "action" {
indent(0);
> «@name»(session,
> «@name»(session, state,
choose {
when "parm" > «name(parm/*)»
otherwise > NULL


Loading…
Cancel
Save