Bug 480461: skip items that cannot be decrypted

This commit is contained in:
Dan Mills 2009-02-26 17:31:06 -08:00
parent 7cdfbeed20
commit bfa22eed1a

View File

@ -291,14 +291,11 @@ SyncEngine.prototype = {
let item;
let count = {applied: 0, reconciled: 0};
this._lastSyncTmp = 0;
while ((item = yield newitems.iter.next(self.cb))) {
this._lowMemCheck();
try {
yield item.decrypt(self.cb, ID.get('WeaveCryptoID').password);
} catch (e) {
this._log.error("Could not decrypt incoming record: " +
Utils.exceptionStr(e));
}
if (yield this._reconcile.async(this, self.cb, item)) {
count.applied++;
yield this._applyIncoming.async(this, self.cb, item);
@ -308,6 +305,10 @@ SyncEngine.prototype = {
if (this._lastSyncTmp < item.modified)
this._lastSyncTmp = item.modified;
}
} catch (e) {
this._log.error("Could not process incoming record: " +
Utils.exceptionStr(e));
}
}
if (this.lastSync < this._lastSyncTmp)
this.lastSync = this._lastSyncTmp;