Fennec now launches first run page, and updates extensions.weave.lastversion, so that it's no longer resetting syncId and therefore resetting the server every single time it tries to sync. Also set the download in resource.js to use LOAD_BYPASS_CACHE. Together these changes seem to fix bug 480270.

This commit is contained in:
jonathandicarlo@jonathan-dicarlos-macbook-pro.local 2009-03-07 00:55:47 -08:00
Родитель cab6971dac
Коммит 559cdb74cc
4 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -105,7 +105,9 @@ ClientEngine.prototype = {
},
get syncID() {
if (!Svc.Prefs.get("client.syncID"))
let oldSyncId = Svc.Prefs.get("client.syncID");
dump("oldSyncId is " + oldSyncId + "\n");
if (!oldSyncId)
Svc.Prefs.set("client.syncID", Utils.makeGUID());
return Svc.Prefs.get("client.syncID");
},

Просмотреть файл

@ -151,7 +151,7 @@ Resource.prototype = {
QueryInterface(Ci.nsIRequest);
// Always validate the cache:
let loadFlags = this._lastChannel.loadFlags;
loadFlags |= Ci.nsIRequest.VALIDATE_ALWAYS;
loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE; //VALIDATE_ALWAYS;
this._lastChannel.loadFlags = loadFlags;
this._lastChannel = this._lastChannel.QueryInterface(Ci.nsIHttpChannel);

Просмотреть файл

@ -578,6 +578,7 @@ WeaveSvc.prototype = {
this._log.debug("Fetching global metadata record");
let meta = yield Records.import(self.cb, this.clusterURL +
this.username + "/meta/global");
let remoteVersion = (meta && meta.payload.storageVersion)?
meta.payload.storageVersion : "";
@ -623,6 +624,8 @@ WeaveSvc.prototype = {
return;
} else if (meta.payload.syncID != Clients.syncID) {
this._log.warn("Meta.payload.syncID is " + meta.payload.syncID);
this._log.warn(", Clients.syncID is " + Clients.syncID);
yield this.resetClient(self.cb);
this._log.info("Reset client because of syncID mismatch.");
Clients.syncID = meta.payload.syncID;

Просмотреть файл

@ -36,3 +36,4 @@ pref("extensions.weave.log.logger.engine.tabs", "Debug");
pref("extensions.weave.log.logger.engine.clients", "Debug");
pref("extensions.weave.network.numRetries", 2);
pref("extensions.weave.client.syncID", "YOUR MOM");