ENGINE-362: decorate with pEp version in encrypt_message_to_self for M2.0 decrypt
authorKrista Bennett <krista@pep-project.org>
Wed, 21 Feb 2018 17:05:56 +0100
changeset 2530f460c1c5f1cb
parent 2529 d40fa7b81cc6
child 2531 68b7fb2ad5b2
ENGINE-362: decorate with pEp version in encrypt_message_to_self for M2.0 decrypt
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Feb 21 15:47:21 2018 +0100
     1.2 +++ b/src/message_api.c	Wed Feb 21 17:05:56 2018 +0100
     1.3 @@ -176,11 +176,6 @@
     1.4          stringpair_list_t* opt_fields = msg->opt_fields;
     1.5          stringpair_t* pair = NULL;
     1.6          
     1.7 -        if (!opt_fields) {
     1.8 -            msg->opt_fields = new_stringpair_list(NULL);
     1.9 -            opt_fields = msg->opt_fields;
    1.10 -        }
    1.11 -        
    1.12          if (opt_fields) {
    1.13              while (opt_fields) {
    1.14                  pair = opt_fields->value;
    1.15 @@ -191,9 +186,6 @@
    1.16                  opt_fields = opt_fields->next;
    1.17              }
    1.18          }
    1.19 -        else
    1.20 -            return;
    1.21 -
    1.22          
    1.23          if (pair) {
    1.24              free(pair->value);
    1.25 @@ -1822,6 +1814,7 @@
    1.26               if (msg->id == NULL)
    1.27                   goto enomem;
    1.28           }
    1.29 +         decorate_message(msg, PEP_rating_undefined, NULL, true);
    1.30       }
    1.31  
    1.32      *dst = msg;