From 3e935d30d19726251e420667bb0f2920fd7da62e Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Thu, 4 Jun 2009 10:17:27 -0700 Subject: [PATCH] Fix Resource.* call sites used for wiping the server and initial sync (+ key gen upload) --- services/sync/modules/base_records/keys.js | 2 +- services/sync/modules/engines.js | 2 +- services/sync/modules/service.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/sync/modules/base_records/keys.js b/services/sync/modules/base_records/keys.js index 14b71ab884cb..34a1d94b8cbd 100644 --- a/services/sync/modules/base_records/keys.js +++ b/services/sync/modules/base_records/keys.js @@ -187,7 +187,7 @@ PubKeyManager.prototype = { let self = yield; for each (let key in keys) { let res = new Resource(key.uri); - yield res.put(self.cb, key.serialize()); + res.put(key.serialize()); } }; fn.async(this, onComplete, keys); diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index f75083d3f5bd..ecc52d736381 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -309,7 +309,7 @@ SyncEngine.prototype = { meta.generateIV(); yield meta.addUnwrappedKey(self.cb, pubkey, symkey); let res = new Resource(meta.uri); - yield res.put(self.cb, meta.serialize()); + res.put(meta.serialize()); } // first sync special case: upload all items diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 6aa3c084f6a2..50771a08aa41 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -989,7 +989,7 @@ WeaveSvc.prototype = { meta.payload.storageVersion = WEAVE_VERSION; meta.payload.syncID = Clients.syncID; let res = new Resource(meta.uri); - yield res.put(self.cb, meta.serialize()); + res.put(meta.serialize()); }, /** @@ -1007,7 +1007,7 @@ WeaveSvc.prototype = { // Grab all the collections for the user let userURL = this.clusterURL + this.username + "/"; let res = new Resource(userURL); - yield res.get(self.cb); + res.get(); // Get the array of collections and delete each one let allCollections = JSON.parse(res.data); @@ -1017,7 +1017,7 @@ WeaveSvc.prototype = { if (engines && engines.indexOf(name) == -1) continue; - yield new Resource(userURL + name).delete(self.cb); + new Resource(userURL + name).delete(); } catch(ex) { this._log.debug("Exception on wipe of '" + name + "': " + Utils.exceptionStr(ex));