From bf96eca33707571994df4b29c50041fc047b9029 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 12 Aug 2006 04:44:58 +0000 Subject: [PATCH] Use alternate method of differentiating between no network connection and invalid repository response in _updateScrapersRemoteCallback(), since xmlhttp.noNetwork property is no longer available (xmlhttp.status seems to turn into a very large integer when there's a network error--I can't imagine this a fairly reliable test, but, then, neither was the previous one, and at least at the moment we're not actually using the test for anything other than an appropriate debug message) --- chrome/chromeFiles/content/scholar/xpcom/schema.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/schema.js b/chrome/chromeFiles/content/scholar/xpcom/schema.js index c7427dbf65..be33adf884 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/schema.js +++ b/chrome/chromeFiles/content/scholar/xpcom/schema.js @@ -288,7 +288,10 @@ Scholar.Schema = new function(){ **/ function _updateScrapersRemoteCallback(xmlhttp){ if (!xmlhttp.responseXML){ - if (!xmlhttp.noNetwork){ + if (xmlhttp.status>1000){ + Scholar.debug('No network connection', 2); + } + else { Scholar.debug('Invalid response from repository', 2); } _setRepositoryTimer(SCHOLAR_CONFIG['REPOSITORY_RETRY_INTERVAL']);