ENGINE-402: added own user-id case to avoid unnecessary update_identity where possible
authorKrista Bennett <krista@pep-project.org>
Fri, 23 Mar 2018 16:39:45 +0100
changeset 258588d9763930cd
parent 2583 170f1497ed67
child 2586 9749e509f3ec
ENGINE-402: added own user-id case to avoid unnecessary update_identity where possible
src/message_api.c
     1.1 --- a/src/message_api.c	Fri Mar 23 01:02:53 2018 +0100
     1.2 +++ b/src/message_api.c	Fri Mar 23 16:39:45 2018 +0100
     1.3 @@ -2954,7 +2954,7 @@
     1.4              if (!is_me(session, msg->to->ident))
     1.5                  _tmp_status = update_identity(session, msg->to->ident);
     1.6              
     1.7 -            if (_tmp_status == PEP_STATUS_OK && msg->to->ident->me) {
     1.8 +            if (_tmp_status == PEP_STATUS_OK && is_me(session, msg->to->ident)) {
     1.9                  // flag it as such
    1.10                  *flags |= PEP_decrypt_flag_own_private_key;
    1.11              }