ENGINE-681 - attempt at not sending in new own identities to sync ENGINE-681
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 02 Dec 2019 15:02:01 +0100
branchENGINE-681
changeset 42295b2f9c4d1519
parent 4228 724d8085b47d
child 4230 32e460bdb3a1
ENGINE-681 - attempt at not sending in new own identities to sync
sync/cond_act_sync.yml2
     1.1 --- a/sync/cond_act_sync.yml2	Thu Nov 28 15:48:41 2019 +0100
     1.2 +++ b/sync/cond_act_sync.yml2	Mon Dec 02 15:02:01 2019 +0100
     1.3 @@ -427,9 +427,17 @@
     1.4  ||
     1.5      PEP_STATUS status = PEP_STATUS_OK;
     1.6  
     1.7 +    bool is_grouped = false;
     1.8 +    status = deviceGrouped(session, &is_grouped);
     1.9 +    if (status)
    1.10 +        return status;
    1.11 +
    1.12      // set flag for all keys; don't change anything else
    1.13      for (identity_list *il = session->sync_state.own.identities; il && il->ident ; il = il->next) {
    1.14 -        if (!(il->ident->flags && PEP_idf_not_for_sync)) {
    1.15 +        // if the keys are not already marked as not for sync and the 
    1.16 +        // device isn't already grouped (because those identities should 
    1.17 +        // already have the flag set), set the device group flag.
    1.18 +        if (!(il->ident->flags & PEP_idf_not_for_sync) && !(is_grouped)) {
    1.19              status = set_identity_flags(session, il->ident, PEP_idf_devicegroup);
    1.20              if (status)
    1.21                  return status;