diff options
author | Lukas Zeller <luz@synthesis.ch> | 2010-03-18 13:35:30 +0100 |
---|---|---|
committer | Lukas Zeller <luz@synthesis.ch> | 2010-03-18 13:35:30 +0100 |
commit | 2dd107df40c551a5517beb4a751c02e9277890a6 (patch) | |
tree | fc363524c86edc498ac03c0a4f25b679fe5f9195 | |
parent | a49b6b113a49298078965f633f14076031a406b7 (diff) | |
parent | ce704f6f521e9153d801f47d750a9a45fcc6f507 (diff) |
Merge remote branch 'moblin/master' into luz
-rwxr-xr-x | src/sysync/synccommand.cpp | 9 | ||||
-rw-r--r-- | src/sysync/syncsession.cpp | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/sysync/synccommand.cpp b/src/sysync/synccommand.cpp index 1892b24..73560cc 100755 --- a/src/sysync/synccommand.cpp +++ b/src/sysync/synccommand.cpp @@ -2270,6 +2270,7 @@ bool TSyncOpCommand::execute(void) localstatus sta; TSyncOpCommand *incompleteCmdP; bool queueforlater,processitem; + bool nostatus; SmlItemListPtr_t tobequeueditems=NULL; SYSYNC_TRY { @@ -2292,6 +2293,7 @@ bool TSyncOpCommand::execute(void) while (*itemnodePP) { queueforlater=false; // do no queue by default processitem=true; // process by default + nostatus=false; // set to true if someone else is responsible for updating fLastItemStatus thisitemnode = *itemnodePP; // no result nor status so far statusCmdP=NULL; @@ -2531,7 +2533,10 @@ bool TSyncOpCommand::execute(void) // - first remove global link to it to avoid recursion fSessionP->fIncompleteDataCommandP=NULL; // - execute now (and pass ownership) - // issues appropriate statuses + // issues appropriate statuses, so we don't need to deal with it; + // in fact, we must not touch fLastItemStatus because we don't + // know the status + nostatus=true; fSessionP->process(incompleteCmdP); // - this item is processed now, continue in loop if there are more items processitem=false; // do not process the item normally @@ -2628,7 +2633,7 @@ bool TSyncOpCommand::execute(void) // item processed // - remember status (final only) for possible suspend and resume sta= statusCmdP ? statusCmdP->getStatusCode() : 0; - if (sta!=213) { + if (!nostatus && sta!=213) { // final status received, save it for possible resend fDataStoreP->fLastItemStatus = sta; // but forget data stored at DS level diff --git a/src/sysync/syncsession.cpp b/src/sysync/syncsession.cpp index c7e5d8b..a1684e1 100644 --- a/src/sysync/syncsession.cpp +++ b/src/sysync/syncsession.cpp @@ -947,6 +947,11 @@ TSyncSession::TSyncSession( // assume normal, full-featured session. Profile config or session progress might set this flag later fLegacyMode = false; fLenientMode = false; + + //initialize the conditonal variables to keep valgrind happy + fNeedAuth = true; + fRemoteRequestedAuth = auth_none; + #ifdef SYDEBUG // initialize session debug logging fSessionDebugLogs=getRootConfig()->fDebugConfig.fSessionDebugLogs; /// init from config @todo: get rid of this special session level flag, handle it all via session logger's fDebugEnabled / getDbgMask() |