]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/Deluge/ObjectTransferP.nc
Uncomment a line that was left commented out by mistake. This prevented the dissemina...
[tinyos-2.x.git] / tos / lib / net / Deluge / ObjectTransferP.nc
index 777a6cfab0d225a102051821b45d8abeb4f4b40d..d2c2d820cfd1ee3d6f4020f6f0c094c6e1d42d55 100644 (file)
@@ -111,8 +111,8 @@ implementation
       resetTimer();
     } else {
       call DelugePageTransfer.setWorkingPage(DELUGE_INVALID_OBJID, DELUGE_INVALID_PGNUM);
-      state = S_SYNC;
       call ObjectTransfer.stop();
+      state = S_SYNC;
       call BlockWrite.sync[cont_receive_img_num]();
     }
   }
@@ -249,8 +249,9 @@ implementation
       } else {
         call DelugePageTransfer.setWorkingPage(curObjDesc.objid, curObjDesc.numPgsComplete);
         state = S_SYNC;
-        call ObjectTransfer.stop();
-        call BlockWrite.sync[cont_receive_img_num]();
+        if (call BlockWrite.sync[cont_receive_img_num]() != SUCCESS) {
+          post signalObjRecvDone();
+        }
       }
     }
   }