diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-06-20 12:31:24 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-06-20 12:31:24 +0200 |
commit | da9f577950b061deca09956132445c21dba688cd (patch) | |
tree | 07f965226e1e2b27cd17bb7cb00f5647093755e0 | |
parent | b2a8365e44c7f7ccbfff05d5c63ae966aafc2930 (diff) |
command line: improved support for aborting while checking sources
A --configure operation checks whether backends are usable before
enabling them. This can take a while or fail for every single source
after a long timeout, in particular when the backend needs to contact
a remote server and that server was not configured correctly or is
dead (WebDAV!).
Now the command line checks for abort requests in the loop over
sources.
-rw-r--r-- | src/syncevo/Cmdline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/syncevo/Cmdline.cpp b/src/syncevo/Cmdline.cpp index 8d47c6bb..c2ec0a1c 100644 --- a/src/syncevo/Cmdline.cpp +++ b/src/syncevo/Cmdline.cpp @@ -26,6 +26,7 @@ #include <syncevo/SyncSource.h> #include <syncevo/SyncContext.h> #include <syncevo/util.h> +#include <syncevo/SuspendFlags.h> #include "test.h" #include <synthesis/SDK_util.h> @@ -1113,7 +1114,8 @@ bool Cmdline::run() { if (fromScratch) { list<string> configuredSources = to->getSyncSources(); set<string> sources = m_sources; - + SuspendFlags &s = SuspendFlags::getSuspendFlags(); + BOOST_FOREACH(const string &source, configuredSources) { boost::shared_ptr<PersistentSyncSourceConfig> sourceConfig(to->getSyncSourceConfig(source)); string disable = ""; @@ -1145,6 +1147,7 @@ bool Cmdline::run() { disable = "backend failed"; } } + s.checkForNormal(); } // Do sanity checking of source (can it be enabled?), |