src/key_reset.c
branchsync
changeset 4353 3c59288158d7
parent 4350 fe4f0b28aa48
child 4356 abf2aaa18e05
     1.1 --- a/src/key_reset.c	Sat Jan 18 23:15:45 2020 +0100
     1.2 +++ b/src/key_reset.c	Mon Jan 20 10:13:18 2020 +0100
     1.3 @@ -1040,10 +1040,11 @@
     1.4              const char* own_key = curr_key->value;
     1.5              status = get_identities_by_main_key_id(session, own_key, &key_idents);
     1.6              
     1.7 -            if (status != PEP_CANNOT_FIND_IDENTITY)
     1.8 -                status = _key_reset_device_group_for_shared_key(session, key_idents, own_key, true);
     1.9 -            
    1.10 -            if (status != PEP_STATUS_OK)
    1.11 +            if (status == PEP_CANNOT_FIND_IDENTITY)
    1.12 +                continue;
    1.13 +            else if (status == PEP_STATUS_OK)    
    1.14 +                status = _key_reset_device_group_for_shared_key(session, key_idents, own_key, true);            
    1.15 +            else 
    1.16                  goto pEp_free;
    1.17              
    1.18              free_identity_list(key_idents);