[Xmpp4js-commit] SF.net SVN: xmpp4js:[765] trunk/src/main/javascript
Status: Beta
Brought to you by:
h-iverson
|
From: <h-i...@us...> - 2008-08-04 18:48:02
|
Revision: 765
http://xmpp4js.svn.sourceforge.net/xmpp4js/?rev=765&view=rev
Author: h-iverson
Date: 2008-08-04 18:47:58 +0000 (Mon, 04 Aug 2008)
Log Message:
-----------
- fixed error in IE where I forgot to bind a function context
- fixed parse error when not in debug mode
- added error message to packet listener manager
Modified Paths:
--------------
trunk/src/main/javascript/packet/PacketListenerManager.js
trunk/src/main/javascript/transport/Base.js
trunk/src/main/javascript/transport/Script.js
Modified: trunk/src/main/javascript/packet/PacketListenerManager.js
===================================================================
--- trunk/src/main/javascript/packet/PacketListenerManager.js 2008-08-04 18:45:25 UTC (rev 764)
+++ trunk/src/main/javascript/packet/PacketListenerManager.js 2008-08-04 18:47:58 UTC (rev 765)
@@ -5,6 +5,8 @@
this.stanzaProvider = config.stanzaProvider;
}
+Xmpp4Js.PacketListenerManager.logger = Xmpp4Js.createLogger("xmpp4js.packetlistener");
+
Xmpp4Js.PacketListenerManager.prototype = {
/**
* Add a listener for certain types of packets. All packets are
@@ -65,7 +67,7 @@
} else {
for( var j = 0; j < packetNode.childNodes.getLength(); j++ ) {
var node = packetNode.childNodes.item(j);
-
+
// if it's not a normal element ignore it
if( node.nodeType != 1 /* ELEMENT - are there cross-browser constants? */) {
continue;
@@ -85,6 +87,7 @@
}
}
} catch( e ) {
+;;; Xmpp4Js.PacketListenerManager.logger.error( "Error running packet listener");
// alert( "Exception executing filter: " + e +"\n" + e.fileName + "(" + e.lineNumber + ")");
// alert( e.stack );
}
Modified: trunk/src/main/javascript/transport/Base.js
===================================================================
--- trunk/src/main/javascript/transport/Base.js 2008-08-04 18:45:25 UTC (rev 764)
+++ trunk/src/main/javascript/transport/Base.js 2008-08-04 18:47:58 UTC (rev 765)
@@ -277,8 +277,7 @@
this.polling = packetNode.getAttribute("polling").toString();
}
-;;; Xmpp4Js.Transport.Base.logger.debug( "Get beginSession response. Session ID="+this.sid
- +", hold="+this.hold+", wait="+this.wait+", polling="+this.polling );
+;;; Xmpp4Js.Transport.Base.logger.debug( "Get beginSession response. Session ID="+this.sid+", hold="+this.hold+", wait="+this.wait+", polling="+this.polling );
this.startup();
Modified: trunk/src/main/javascript/transport/Script.js
===================================================================
--- trunk/src/main/javascript/transport/Script.js 2008-08-04 18:45:25 UTC (rev 764)
+++ trunk/src/main/javascript/transport/Script.js 2008-08-04 18:47:58 UTC (rev 765)
@@ -101,16 +101,16 @@
scriptElem.onreadystatechange = function() {
if(scriptElem.readyState == 4 || scriptElem.readyState == "loaded") {
this.onScriptLoad( scriptElem );
- }
+ }
// TODO add error...
- }
+ }.bind(this);
}
document.body.appendChild( scriptElem );
},
onScriptLoad: function(scriptElem) {
- document.body.removeChild( scriptElem );
+ document.body.removeChild( scriptElem );
},
onScriptError: function(scriptElem) {
@@ -155,7 +155,7 @@
try {
// this will throw an exception if there is an error.
this.handleErrors( packetNode );
-
+
this.fireEvent( "recv", packetNode );
} catch(e) {
this.shutdown();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|