~ubuntu-branches/ubuntu/vivid/libsynthesis/vivid-201501071725

« back to all changes in this revision

Viewing changes to src/sysync/synccommand.cpp

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2010-11-20 19:50:44 UTC
  • mfrom: (3.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20101120195044-8s6wxqb2d0nmqdv3
Tags: 3.4.0.6+ds5-2
* Upload to unstable.
* Add missing commit from upstream 3.4.0.6+ds5

Show diffs side-by-side

added added

removed removed

Lines of Context:
2270
2270
  localstatus sta;
2271
2271
  TSyncOpCommand *incompleteCmdP;
2272
2272
  bool queueforlater,processitem;
 
2273
  bool nostatus;
2273
2274
  SmlItemListPtr_t tobequeueditems=NULL;
2274
2275
 
2275
2276
  SYSYNC_TRY {
2292
2293
    while (*itemnodePP) {
2293
2294
      queueforlater=false; // do no queue by default
2294
2295
      processitem=true; // process by default
 
2296
      nostatus=false; // set to true if someone else is responsible for updating fLastItemStatus
2295
2297
      thisitemnode = *itemnodePP;
2296
2298
      // no result nor status so far
2297
2299
      statusCmdP=NULL;
2531
2533
              // - first remove global link to it to avoid recursion
2532
2534
              fSessionP->fIncompleteDataCommandP=NULL;
2533
2535
              // - execute now (and pass ownership)
2534
 
              //   issues appropriate statuses
 
2536
              //   issues appropriate statuses, so we don't need to deal with it;
 
2537
              //   in fact, we must not touch fLastItemStatus because we don't
 
2538
              //   know the status
 
2539
              nostatus=true;
2535
2540
              fSessionP->process(incompleteCmdP);
2536
2541
              // - this item is processed now, continue in loop if there are more items
2537
2542
              processitem=false; // do not process the item normally
2628
2633
        // item processed
2629
2634
        // - remember status (final only) for possible suspend and resume
2630
2635
        sta= statusCmdP ? statusCmdP->getStatusCode() : 0;
2631
 
        if (sta!=213) {
 
2636
        if (!nostatus && sta!=213) {
2632
2637
          // final status received, save it for possible resend
2633
2638
          fDataStoreP->fLastItemStatus = sta;
2634
2639
          // but forget data stored at DS level
3116
3121
      while (mapItemListP) {
3117
3122
        mapItemP=mapItemListP->mapItem;
3118
3123
        if (mapItemP) {
3119
 
          // call datastore to mark this map for pending (need to be sent again in next session / resume)
 
3124
          // call datastore to mark this map confirmed (no need to be sent again in next session / resume)
3120
3125
          fLocalDataStoreP->engMarkMapConfirmed(
3121
3126
            smlSrcTargLocURIToCharP(mapItemP->source), // source for outgoing mapitem is localID
3122
3127
            smlSrcTargLocURIToCharP(mapItemP->target) // target for outgoing mapitem is remoteID