ENGINE-140 #comment prevent to accept excluded identity from devices where identity haven't been excluded
authorEdouard Tisserant <edouard@pep-project.org>
Tue, 22 Nov 2016 14:57:53 +0100
changeset 141341c869ac1c48
parent 1412 51341b8d69d0
child 1414 26697bb8bc2c
ENGINE-140 #comment prevent to accept excluded identity from devices where identity haven't been excluded
src/sync_actions.c
     1.1 --- a/src/sync_actions.c	Mon Nov 21 22:27:25 2016 +0100
     1.2 +++ b/src/sync_actions.c	Tue Nov 22 14:57:53 2016 +0100
     1.3 @@ -244,6 +244,19 @@
     1.4      identity_list *group_keys = (identity_list *) _group_keys;
     1.5  
     1.6      for (identity_list *il = group_keys; il && il->ident; il = il->next) {
     1.7 +
     1.8 +        // Check that identity isn't excluded from sync.
     1.9 +        pEp_identity *stored_identity;
    1.10 +        status = get_identity(session, il->ident->address, PEP_OWN_USERID,
    1.11 +                &stored_identity);
    1.12 +        if (status == PEP_STATUS_OK) {
    1.13 +            if(stored_identity->flags & PEP_idf_not_for_sync){
    1.14 +                free_identity(stored_identity);
    1.15 +                continue;
    1.16 +            }
    1.17 +            free_identity(stored_identity);
    1.18 +        }
    1.19 +
    1.20          free(il->ident->user_id);
    1.21          il->ident->user_id = strdup(PEP_OWN_USERID);
    1.22          assert(il->ident->user_id);