Don't do update_identity() twice
authorVolker Birk <vb@pep.foundation>
Mon, 19 Mar 2018 17:33:16 +0100
changeset 25762eafd0cc0c8c
parent 2575 b9697c489261
child 2577 d49c5486720c
child 2578 73da15bd0c14
Don't do update_identity() twice
src/message_api.c
     1.1 --- a/src/message_api.c	Thu Mar 15 14:09:49 2018 +0100
     1.2 +++ b/src/message_api.c	Mon Mar 19 17:33:16 2018 +0100
     1.3 @@ -3054,10 +3054,9 @@
     1.4          if (il->ident)
     1.5          {   
     1.6              PEP_STATUS status = PEP_STATUS_OK;
     1.7 -            if (!is_me(session, il->ident))
     1.8 -                status = update_identity(session, il->ident);
     1.9 -            else
    1.10 -                status = myself(session, il->ident);
    1.11 +            *max_comm_type = _get_comm_type(session, *max_comm_type,
    1.12 +                il->ident);
    1.13 +            *comm_type_determined = true;
    1.14              
    1.15              bool is_blacklisted = false;
    1.16              if (il->ident->fpr && IS_PGP_CT(il->ident->comm_type)) {
    1.17 @@ -3084,11 +3083,6 @@
    1.18                  *max_comm_type = PEP_ct_no_encryption;
    1.19                  *comm_type_determined = true;
    1.20              }
    1.21 -            else {
    1.22 -                *max_comm_type = _get_comm_type(session, *max_comm_type,
    1.23 -                        il->ident);
    1.24 -                *comm_type_determined = true;
    1.25 -            }
    1.26          }
    1.27      }
    1.28  }