Shut down sync before key reset and start up again afterwards sync
authorThomas
Thu, 21 Nov 2019 17:27:18 +0100
branchsync
changeset 376c29ae3e408a8
parent 375 fe31c63ea77d
child 377 f3db78b86204
Shut down sync before key reset and start up again afterwards
CpEpEngine.cpp
     1.1 --- a/CpEpEngine.cpp	Thu Nov 21 11:28:02 2019 +0100
     1.2 +++ b/CpEpEngine.cpp	Thu Nov 21 17:27:18 2019 +0100
     1.3 @@ -826,8 +826,13 @@
     1.4  
     1.5  STDMETHODIMP CpEpEngine::KeyResetAllOwnKeys()
     1.6  {
     1.7 +    // We have to stop sync before resetting all own keys and enable it again afterwards
     1.8 +    ShutDownSync();
     1.9 +
    1.10      PEP_STATUS status = ::key_reset_all_own_keys(session());
    1.11  
    1.12 +    Startup();
    1.13 +
    1.14      if (status == PEP_OUT_OF_MEMORY)
    1.15          return E_OUTOFMEMORY;
    1.16