ENGINE-354: fixed bad call to is_pep_user
authorKrista Bennett <krista@pep-project.org>
Mon, 19 Feb 2018 12:03:30 +0100
changeset 2520a8704b38e8fb
parent 2519 dd4a8df2fc33
child 2521 9ed30868146c
ENGINE-354: fixed bad call to is_pep_user
src/keymanagement.c
src/pEpEngine.c
     1.1 --- a/src/keymanagement.c	Mon Feb 19 11:54:23 2018 +0100
     1.2 +++ b/src/keymanagement.c	Mon Feb 19 12:03:30 2018 +0100
     1.3 @@ -406,9 +406,7 @@
     1.4          return_id->fpr = strdup(stored_ident->fpr);
     1.5          
     1.6      return_id->comm_type = stored_ident->comm_type;
     1.7 -    
     1.8 -    adjust_pep_trust_status(session, return_id);
     1.9 -                
    1.10 +                    
    1.11      // We patch the DB with the input username, but if we didn't have
    1.12      // one, we pull it out of storage if available.
    1.13      // (also, if the input username is "anonymous" and there exists
    1.14 @@ -435,7 +433,10 @@
    1.15      if (EMPTYSTR(return_id->user_id)) {
    1.16          free(return_id->user_id);
    1.17          return_id->user_id = strdup(stored_ident->user_id);
    1.18 -    }    
    1.19 +    } 
    1.20 +    
    1.21 +    adjust_pep_trust_status(session, return_id);
    1.22 +   
    1.23      // Call set_identity() to store
    1.24      if ((is_identity_default || is_user_default) &&
    1.25           is_address_default) {                 
     2.1 --- a/src/pEpEngine.c	Mon Feb 19 11:54:23 2018 +0100
     2.2 +++ b/src/pEpEngine.c	Mon Feb 19 12:03:30 2018 +0100
     2.3 @@ -2525,7 +2525,7 @@
     2.4          return PEP_ILLEGAL_VALUE;
     2.5      
     2.6      *is_pep = false;
     2.7 -    
     2.8 +            
     2.9      const char* user_id = identity->user_id;
    2.10      
    2.11      if (!session || EMPTYSTR(user_id))