fixed update_identity call that could be called on a myself value in outgoing_message_rating
authorKrista Bennett <krista@pep-project.org>
Fri, 19 Jan 2018 14:12:02 +0100
changeset 241805678e77bc6a
parent 2415 7410f7666976
child 2419 f96ddad10a7b
fixed update_identity call that could be called on a myself value in outgoing_message_rating
src/message_api.c
     1.1 --- a/src/message_api.c	Fri Jan 19 11:01:39 2018 +0100
     1.2 +++ b/src/message_api.c	Fri Jan 19 14:12:02 2018 +0100
     1.3 @@ -2762,8 +2762,12 @@
     1.4      for (il = identities; il != NULL; il = il->next)
     1.5      {
     1.6          if (il->ident)
     1.7 -        {
     1.8 -            PEP_STATUS status = update_identity(session, il->ident);
     1.9 +        {   
    1.10 +            PEP_STATUS status = PEP_STATUS_OK;
    1.11 +            if (is_me(session, il->ident))
    1.12 +                status = update_identity(session, il->ident);
    1.13 +            else
    1.14 +                status = myself(session, il->ident);
    1.15              if (status == PEP_STATUS_OK)
    1.16              {
    1.17                  *max_comm_type = _get_comm_type(session, *max_comm_type,