local sync: make more sync settings available to client
Temporarily setting --sync-property values only affects the server side of local sync. This patch extends a hack which copies some relevant values over into the client: - do it sooner - copy additional properties A better way to set these properties on both sides of local sync is needed.
This commit is contained in:
parent
1f192f6d76
commit
78276d4fed
|
@ -138,6 +138,16 @@ void LocalTransportAgent::run()
|
|||
boost::shared_ptr<TransportAgent>(this, NoopAgentDestructor()),
|
||||
true);
|
||||
|
||||
// Copy some changes from main config: this is the only way
|
||||
// how they can be set temporarily during a sync.
|
||||
// TODO: find a way to have separate temporary settings
|
||||
// for both sides.
|
||||
client.setLogLevel(m_server->getLogLevel(), true);
|
||||
client.setUsername(m_server->getUsername(), true);
|
||||
client.setPassword(m_server->getPassword(), true);
|
||||
client.setPreventSlowSync(m_server->getPreventSlowSync(), true);
|
||||
client.setPrintChanges(m_server->getPrintChanges(), true);
|
||||
|
||||
// disable all sources temporarily, will be enabled by next loop
|
||||
BOOST_FOREACH(const string &targetName, client.getSyncSources()) {
|
||||
SyncSourceNodes targetNodes = client.getSyncSourceNodes(targetName);
|
||||
|
@ -178,8 +188,6 @@ void LocalTransportAgent::run()
|
|||
}
|
||||
|
||||
// now sync
|
||||
client.setLogLevel(m_server->getLogLevel(), true);
|
||||
client.setPrintChanges(m_server->getPrintChanges(), true);
|
||||
client.sync(&m_clientReport);
|
||||
} catch(...) {
|
||||
SyncMLStatus status = m_clientReport.getStatus();
|
||||
|
|
Loading…
Reference in New Issue