detecting if DELETE was not working sync
authorVolker Birk <vb@pep-project.org>
Mon, 29 Apr 2019 12:34:55 +0200
branchsync
changeset 3572b5fab91365e7
parent 3571 dd5d993af3c3
child 3573 1de13ee0a622
child 3583 3c796707c727
detecting if DELETE was not working
src/pgp_sequoia.c
sync/sync.fsm
     1.1 --- a/src/pgp_sequoia.c	Mon Apr 29 12:15:53 2019 +0200
     1.2 +++ b/src/pgp_sequoia.c	Mon Apr 29 12:34:55 2019 +0200
     1.3 @@ -1587,6 +1587,10 @@
     1.4      if (sqlite_result != SQLITE_OK)
     1.5          return PEP_CANNOT_DELETE_KEY;
     1.6  
     1.7 +    sqlite_result = sqlite3_changes(session->key_db);
     1.8 +    if (sqlite_result < 1)
     1.9 +        return PEP_KEY_NOT_FOUND;
    1.10 +
    1.11      return PEP_STATUS_OK;
    1.12  }
    1.13  
     2.1 --- a/sync/sync.fsm	Mon Apr 29 12:15:53 2019 +0200
     2.2 +++ b/sync/sync.fsm	Mon Apr 29 12:34:55 2019 +0200
     2.3 @@ -225,6 +225,7 @@
     2.4  
     2.5          state NewGroupFirst {
     2.6              on Init {
     2.7 +                do closeTransaction;
     2.8                  do prepareOwnKeys;
     2.9                  send OwnKeysFirst; // we're not grouped yet, this is our own keys
    2.10              }
    2.11 @@ -243,6 +244,7 @@
    2.12  
    2.13          state NewGroupSecond {
    2.14              on Init {
    2.15 +                do closeTransaction;
    2.16                  do prepareOwnKeys;
    2.17                  send OwnKeysSecond; // we're not grouped yet, this is our own keys
    2.18              }
    2.19 @@ -360,11 +362,12 @@
    2.20  
    2.21          state JoinGroup {
    2.22              on Init {
    2.23 +                do closeTransaction;
    2.24                  do prepareOwnKeys;
    2.25 -                send GroupKeys;
    2.26 +                send OwnKeys;
    2.27              }
    2.28  
    2.29 -            on GroupKeys if sameTransaction {
    2.30 +            on GroupKeys {
    2.31                  do saveGroupKeys;
    2.32                  do receivedKeysAreGroupKeys;
    2.33                  do showDeviceAdded;