CpEpEngine.cpp
branchsync
changeset 384 b22401805ef0
parent 383 eecca51a4ff0
child 388 82731e50c0d7
     1.1 --- a/CpEpEngine.cpp	Tue Dec 24 13:44:31 2019 +0100
     1.2 +++ b/CpEpEngine.cpp	Wed Jan 15 17:36:32 2020 +0100
     1.3 @@ -853,15 +853,8 @@
     1.4  
     1.5      string _fpr = utf8_string(fpr);
     1.6  
     1.7 -    // For an own identity, we have to stop sync before resetting all own keys and enable it again afterwards
     1.8 -    if (ident.Me)
     1.9 -        ShutDownSync();
    1.10 -
    1.11      PEP_STATUS status = ::key_reset_identity(session(), _ident, _fpr.c_str());
    1.12  
    1.13 -    if (ident.Me)
    1.14 -        Startup();
    1.15 -
    1.16      free_identity(_ident);
    1.17  
    1.18      if (status == PEP_OUT_OF_MEMORY)
    1.19 @@ -881,17 +874,8 @@
    1.20      string _userId = utf8_string(userId);
    1.21      string _fpr = utf8_string(fpr);
    1.22  
    1.23 -    // For an own identity, we have to stop sync before resetting all own keys and enable it again afterwards
    1.24 -    bool ownIdentity = (_userId.compare(PEP_OWN_USERID) == 0);
    1.25 -
    1.26 -    if (ownIdentity)
    1.27 -        ShutDownSync();
    1.28 -
    1.29      PEP_STATUS status = ::key_reset_user(session(), _userId.c_str(), _fpr.c_str());
    1.30  
    1.31 -    if (ownIdentity)
    1.32 -        Startup();
    1.33 -
    1.34      if (status == PEP_OUT_OF_MEMORY)
    1.35          return E_OUTOFMEMORY;
    1.36  
    1.37 @@ -906,13 +890,8 @@
    1.38  
    1.39  STDMETHODIMP CpEpEngine::KeyResetAllOwnKeys()
    1.40  {
    1.41 -    // We have to stop sync before resetting all own keys and enable it again afterwards
    1.42 -    ShutDownSync();
    1.43 -
    1.44      PEP_STATUS status = ::key_reset_all_own_keys(session());
    1.45  
    1.46 -    Startup();
    1.47 -
    1.48      if (status == PEP_OUT_OF_MEMORY)
    1.49          return E_OUTOFMEMORY;
    1.50