[z3-checkins] r25957 - z3/jsonserver/branch/merge/browser

reebalazs at codespeak.net reebalazs at codespeak.net
Tue Apr 18 17:24:58 CEST 2006


Author: reebalazs
Date: Tue Apr 18 17:24:57 2006
New Revision: 25957

Modified:
   z3/jsonserver/branch/merge/browser/requestmanager.js
Log:
Fix request manager

Modified: z3/jsonserver/branch/merge/browser/requestmanager.js
==============================================================================
--- z3/jsonserver/branch/merge/browser/requestmanager.js	(original)
+++ z3/jsonserver/branch/merge/browser/requestmanager.js	Tue Apr 18 17:24:57 2006
@@ -81,7 +81,7 @@
 jsonrpc.RequestManager.prototype.notifyServer = function(func, url) {
   // func must be a partial (e.g. use Mochikit or wrap up)
   // here url is only for the logging
-  if (! jsonrpc.requestManager.isSentRequestQueueFull()) {
+  if (! this.isSentRequestQueueFull()) {
     // can be sent if we are not over the limit.
     this.pushSentRequest(func, url);
     this.log('Notify server at ' + url);
@@ -95,14 +95,14 @@
 jsonrpc.RequestManager.prototype.receivedResult = function() {
   // must be called when one result arrived
   // Mark that we have one less request out.
-  jsonrpc.requestManager.popSentRequest();
-  if (! jsonrpc.requestManager.isWaitingRequestQueueEmpty()) {
+  this.popSentRequest();
+  if (! this.isWaitingRequestQueueEmpty()) {
     // see if we can send another request in place of the received one
     // request is waiting, send it.
-    var waiting = jsonrpc.requestManager.popWaitingRequest();
+    var waiting = this.popWaitingRequest();
     var func = waiting[0];
     var url = waiting[1];
-    jsonrpc.requestManager.pushSentRequest(func, url);
+    this.pushSentRequest(func, url);
     this.log("Send queued notification to server at " + url);
     func();
   } else {


More information about the z3-checkins mailing list