ENGINE-135 fixed sameIdentities condition ENGINE-135
authorEdouard Tisserant <edouard@pep-project.org>
Thu, 05 Jan 2017 16:31:49 +0100
branchENGINE-135
changeset 15241994d9dcda63
parent 1523 bc4a9401af51
child 1526 fd344589f32b
child 2708 11e836fe7f0a
ENGINE-135 fixed sameIdentities condition
src/sync_actions.c
     1.1 --- a/src/sync_actions.c	Thu Jan 05 13:05:00 2017 +0100
     1.2 +++ b/src/sync_actions.c	Thu Jan 05 16:31:49 2017 +0100
     1.3 @@ -111,11 +111,11 @@
     1.4      if (!(session && a && b))
     1.5          return invalid_condition; // error
     1.6  
     1.7 -    if ((a->fpr != NULL && b->fpr != NULL) ||
     1.8 +    if (a->fpr == NULL || b->fpr == NULL ||
     1.9          (!_same_fpr(a->fpr, strlen(a->fpr), b->fpr, strlen(b->fpr))) ||
    1.10 -        (a->address != NULL && b->address != NULL) ||
    1.11 +        a->address == NULL || b->address == NULL ||
    1.12          strcmp(a->address, b->address) != 0 ||
    1.13 -        (a->user_id != NULL && b->user_id != NULL) ||
    1.14 +        a->user_id == NULL || b->user_id == NULL ||
    1.15          strcmp(a->user_id, b->user_id) != 0)
    1.16              return 0;
    1.17      return 1;