summaryrefslogtreecommitdiffstats
path: root/synchronizer
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-30 01:10:37 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-30 01:10:37 +0100
commitbf00b2c3a0fbfbdcbd7c5f4ab519049dc02c1263 (patch)
tree1facb41649496418c5a2120391917e28302f8270 /synchronizer
parente7743002a75d83e24de94f712fac0f0b61ab0ca3 (diff)
downloadsink-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.cpp6
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();