Browse Source

many commands give a command list

add_key_notification
Volker Birk 3 years ago
parent
commit
fa4789b9b1
4 changed files with 25 additions and 5 deletions
  1. +1
    -1
      src/key_reset.c
  2. +4
    -2
      sync/distribution.fsm
  3. +4
    -0
      sync/fsm.yml2
  4. +16
    -2
      sync/gen_messages.ysl2

+ 1
- 1
src/key_reset.c View File

@ -718,7 +718,7 @@ PEP_STATUS key_reset_commands_to_PER(const keyreset_command_list *command_list,
return PEP_ILLEGAL_VALUE;
for (const keyreset_command_list *cl = command_list; cl && cl->command; cl = cl->next) {
Commands_t *c = calloc(1, sizeof(Commands_t));
Command_t *c = (Command_t *) calloc(1, sizeof(Command_t));
assert(c);
if (!c)
goto enomem;


+ 4
- 2
sync/distribution.fsm View File

@ -13,8 +13,10 @@ protocol Distribution 2 {
fsm KeyReset 1 {
message Commands 1 {
auto Version version;
field Identity ident;
field Hash newkey;
list Command commandlist {
field Identity ident;
field Hash newkey;
}
}
}
}


+ 4
- 0
sync/fsm.yml2 View File

@ -61,3 +61,7 @@ decl field @type @name;
decl auto < field >;
// … or list of fields
decl list < field >;

+ 16
- 2
sync/gen_messages.ysl2 View File

@ -71,7 +71,7 @@ tstylesheet {
EXPORTS «@name»;
`` call "pEp_imports"
`` apply "message", 0, mode=impl;
`` apply "message//list|message", 0, mode=impl;
«@name» ::= CHOICE {
`` for "message" |> «yml:mixedCase(@name)» [APPLICATION «@id»] «@name»`if "position()!=last()" > ,`
}
@ -84,9 +84,23 @@ tstylesheet {
template "message", mode=impl
||
«@name» ::= SEQUENCE {
`` for "field|auto" |> «func:asn1name()» «func:asn1type()»`if "position()!=last()" > ,`
`` apply "field|auto|list", mode=direct
}
||
template "list", mode=impl
||
«@type» ::= SEQUENCE {
`` apply "field|auto|list", mode=direct
}
||
template "field|auto", mode=direct
| «func:asn1name()» «func:asn1type()»`if "position()!=last()" > ,`
template "list", mode=direct
| «func:asn1name()» SEQUENCE OF «func:asn1type()»`if "position()!=last()" > ,`
}

Loading…
Cancel
Save