diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-12-04 15:38:03 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-12-07 20:09:08 +0100 |
commit | 8f9669ec97f3d106c16c724da077a9068dcd9387 (patch) | |
tree | f218df66437afb0b86b593f01a9554fcd55529aa /src/syncevo/LocalTransportAgent.cpp | |
parent | 489e3794404a493ac98919edc28fe5bb1e12847c (diff) |
PIM + sync: write less data to disk (part of FDO #55921)
Avoid writing config file changes to disk by enabling a new
"ephemeral" mode for syncing via the PIM Manager. This mode is enabled
via the sync mode parameter of the D-Bus API and from there passed
through to the SyncConfig and local sync helper. It cannot be enabled
in the config files (yet?).
In this mode, config file changes are not flushed resp. discarded
directly in the config nodes. This prevents writing to .ini files in
~/.config.
The "synthesis" binfile client files are still written, but they get
redirected into the session directory, which can (and should) be set
to a temp file system and get deleted again quickly.
Data dumps are turned off now in the configs created by the PIM
Manager.
Diffstat (limited to 'src/syncevo/LocalTransportAgent.cpp')
-rw-r--r-- | src/syncevo/LocalTransportAgent.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/syncevo/LocalTransportAgent.cpp b/src/syncevo/LocalTransportAgent.cpp index f9ad91f7..7c64124d 100644 --- a/src/syncevo/LocalTransportAgent.cpp +++ b/src/syncevo/LocalTransportAgent.cpp @@ -206,6 +206,8 @@ void LocalTransportAgent::onChildConnect(const GDBusCXX::DBusConnectionPtr &conn } m_child->m_startSync.start(m_clientContext, StringPair(m_server->getConfigName(), + m_server->isEphemeral() ? + "ephemeral" : m_server->getRootPath()), static_cast<std::string>(m_server->getLogDir()), m_server->getDoLogging(), @@ -700,9 +702,14 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase // initialize sync context m_client.reset(new SyncContext(std::string("target-config") + clientContext, serverConfig.first, + serverConfig.second == "ephemeral" ? + serverConfig.second : serverConfig.second + "/." + clientContext, boost::shared_ptr<TransportAgent>(this, NoopAgentDestructor()), serverDoLogging)); + if (serverConfig.second == "ephemeral") { + m_client->makeEphemeral(); + } boost::shared_ptr<UserInterface> ui(new LocalTransportUI(m_parent)); m_client->setUserInterface(ui); |