do the mapping sync
authorVolker Birk <vb@pep.foundation>
Mon, 05 Nov 2018 18:08:55 +0100
branchsync
changeset 31232475e49c3154
parent 3118 b7f133799831
child 3124 92b0cb493286
child 3125 bcbe0de52f4d
do the mapping
sync/gen_message_func.ysl2
     1.1 --- a/sync/gen_message_func.ysl2	Tue Oct 30 17:08:48 2018 +0100
     1.2 +++ b/sync/gen_message_func.ysl2	Mon Nov 05 18:08:55 2018 +0100
     1.3 @@ -88,6 +88,7 @@
     1.4  #include "pEp_internal.h"
     1.5  #include "map_asn1.h"
     1.6  #include "«@name»_func.h"
     1.7 +`` for "fsm" | #include "«@name»_fsm.h"
     1.8  
     1.9  void free_«@name»_state(PEP_SESSION session)
    1.10  {
    1.11 @@ -144,7 +145,7 @@
    1.12          return PEP_ILLEGAL_VALUE;
    1.13  
    1.14      *fsm = 0;
    1.15 -    *message_type = 0;
    1.16 +    *message_type = None;
    1.17  
    1.18      switch (msg->present) {
    1.19          case «@name»_PR_NOTHING:
    1.20 @@ -292,7 +293,6 @@
    1.21          default:
    1.22              return PEP_ILLEGAL_VALUE;
    1.23      }
    1.24 -    *message_type = msg->choice.«yml:lcase(@name)».payload.present;
    1.25      break;
    1.26  
    1.27  ||
    1.28 @@ -302,6 +302,7 @@
    1.29      ||
    1.30      case «../@name»__payload_PR_«$message_name»:
    1.31          `` apply "field", mode=update_state with "message_name", "$message_name"
    1.32 +        *message_type = «yml:capit($message_name)»;
    1.33          break;
    1.34  
    1.35      ||