IOSAD-103 merge in sync (enum mapping) IOSAD-103
authorDirk Zimmermann <dirk@pep-project.org>
Tue, 06 Nov 2018 07:10:55 +0100
branchIOSAD-103
changeset 312492b0cb493286
parent 3119 f4d996c27258
parent 3123 2475e49c3154
child 3128 7d0a5e2def04
IOSAD-103 merge in sync (enum mapping)
     1.1 --- a/sync/gen_message_func.ysl2	Wed Oct 31 07:21:03 2018 +0100
     1.2 +++ b/sync/gen_message_func.ysl2	Tue Nov 06 07:10: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      ||