Support for extra parameter for sync' protocol' fsm' actions keysync
authorEdouard Tisserant <edouard@pep-project.org>
Sun, 18 Sep 2016 22:12:27 +0200
branchkeysync
changeset 1166f128fb9fe444
parent 1165 05c831cfab65
child 1167 781218f0c0d0
Support for extra parameter for sync' protocol' fsm' actions
src/sync_fsm.c
sync/gen_statemachine.ysl2
     1.1 --- a/src/sync_fsm.c	Sun Sep 18 16:55:53 2016 +0200
     1.2 +++ b/src/sync_fsm.c	Sun Sep 18 22:12:27 2016 +0200
     1.3 @@ -108,7 +108,7 @@
     1.4              switch (event) {
     1.5                  case Init: break;
     1.6                  case GroupKeys:
     1.7 -                    status = storeGroupKeys(session, state, partner, NULL);
     1.8 +                    status = storeGroupKeys(session, state, partner, extra /*keys*/);
     1.9                      if (status == PEP_OUT_OF_MEMORY)
    1.10                          return (int) invalid_out_of_memory;
    1.11                      if (status != PEP_STATUS_OK)
     2.1 --- a/sync/gen_statemachine.ysl2	Sun Sep 18 16:55:53 2016 +0200
     2.2 +++ b/sync/gen_statemachine.ysl2	Sun Sep 18 22:12:27 2016 +0200
     2.3 @@ -223,7 +223,11 @@
     2.4              when "parm" > «name(parm/*)»
     2.5              otherwise > NULL
     2.6          }
     2.7 -        > , NULL);\n
     2.8 +        choose {
     2.9 +            when "parm[2]" > , extra /*«name(parm[2]/*)»*/
    2.10 +            otherwise > , NULL
    2.11 +        }
    2.12 +        > );\n
    2.13          | if (status == PEP_OUT_OF_MEMORY)
    2.14          |> return (int) invalid_out_of_memory;
    2.15          | if (status != PEP_STATUS_OK)