ENGINE-139: merged (and stripped unwanted printfs...)
authorEdouard Tisserant <edouard@pep-project.org>
Mon, 07 Nov 2016 16:25:06 +0100
changeset 1356ac3e66355937
parent 1354 4ab4bdbbd8d9
parent 1355 5cc70d0bc348
child 1358 ff3053a671dc
child 1360 7d3fc7fed5ac
ENGINE-139: merged (and stripped unwanted printfs...)
sync/gen_statemachine.ysl2
     1.1 --- a/src/message_api.c	Sun Nov 06 23:33:35 2016 +0100
     1.2 +++ b/src/message_api.c	Mon Nov 07 16:25:06 2016 +0100
     1.3 @@ -1414,7 +1414,9 @@
     1.4                      status == PEP_MESSAGE_DISCARDED) {
     1.5                      free_message(msg);
     1.6                      msg = NULL;
     1.7 -                    return status;
     1.8 +                    *flags |= (status == PEP_MESSAGE_DISCARDED) ?
     1.9 +                                PEP_decrypt_flag_discarded :
    1.10 +                                PEP_decrypt_flag_consumed;
    1.11                  }
    1.12                  else if (status != PEP_STATUS_OK) {
    1.13                      return status;
    1.14 @@ -1699,6 +1701,11 @@
    1.15                  status == PEP_MESSAGE_DISCARDED) {
    1.16                  free_message(msg);
    1.17                  msg = NULL;
    1.18 +                *flags |= (status == PEP_MESSAGE_DISCARDED) ?
    1.19 +                            PEP_decrypt_flag_discarded :
    1.20 +                            PEP_decrypt_flag_consumed;
    1.21 +
    1.22 +                status = decrypt_status;
    1.23              }
    1.24              else if (status != PEP_STATUS_OK){
    1.25                  goto pep_error;
     2.1 --- a/src/message_api.h	Sun Nov 06 23:33:35 2016 +0100
     2.2 +++ b/src/message_api.h	Mon Nov 07 16:25:06 2016 +0100
     2.3 @@ -157,7 +157,9 @@
     2.4  DYNAMIC_API PEP_color color_from_rating(PEP_rating rating);
     2.5  
     2.6  typedef enum _PEP_decrypt_flags {
     2.7 -    PEP_decrypt_flag_own_private_key = 0x1
     2.8 +    PEP_decrypt_flag_own_private_key = 0x1,
     2.9 +    PEP_decrypt_flag_consumed = 0x2,
    2.10 +    PEP_decrypt_flag_discarded = 0x4
    2.11  } PEP_decrypt_flags; 
    2.12  
    2.13  typedef unsigned int PEP_decrypt_flags_t;