diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-30 01:10:37 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-30 01:10:37 +0100 |
commit | bf00b2c3a0fbfbdcbd7c5f4ab519049dc02c1263 (patch) | |
tree | 1facb41649496418c5a2120391917e28302f8270 /synchronizer | |
parent | e7743002a75d83e24de94f712fac0f0b61ab0ca3 (diff) | |
download | sink-bf00b2c3a0fbfbdcbd7c5f4ab519049dc02c1263.tar.gz sink-bf00b2c3a0fbfbdcbd7c5f4ab519049dc02c1263.zip |
Shutdown command for synchronizers, used by the dummyresourcetest.
Otherwise the synchronizer keeps a Storage object alive, while the tests
deletes the db. This causes subsequent writes to fail in the next test.
Diffstat (limited to 'synchronizer')
-rw-r--r-- | synchronizer/listener.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index f52e48c..d191bb8 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp | |||
@@ -243,6 +243,12 @@ void Listener::processCommand(int commandId, uint messageId, Client &client, uin | |||
243 | m_resource->processCommand(commandId, client.commandBuffer, size, m_pipeline); | 243 | m_resource->processCommand(commandId, client.commandBuffer, size, m_pipeline); |
244 | } | 244 | } |
245 | break; | 245 | break; |
246 | case Akonadi2::Commands::ShutdownCommand: | ||
247 | log(QString("\tReceived shutdown command from %1").arg(client.name)); | ||
248 | callback(); | ||
249 | m_server->close(); | ||
250 | emit noClients(); | ||
251 | return; | ||
246 | default: | 252 | default: |
247 | if (commandId > Akonadi2::Commands::CustomCommand) { | 253 | if (commandId > Akonadi2::Commands::CustomCommand) { |
248 | loadResource(); | 254 | loadResource(); |