[Pkg-javascript-commits] [ltx] 45/469: Connection: Return stanza on send for debugging
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:00:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit 092076d0a49d0482cb4476315b48c43aee2f3bc5
Author: Justin Campbell <cmsjustin at gmail.com>
Date: Tue Jul 27 17:31:10 2010 +0200
Connection: Return stanza on send for debugging
This can help with debug output, like this:
console.log("Out: " + cl.send(stanza));
---
lib/xmpp/connection.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index bf46d7d..e6c7475 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -34,9 +34,12 @@ Connection.prototype.send = function(stanza) {
var el = this.rmStreamNs(stanza.root());
var self = this;
el.write(function(s) { self.write(s); });
+ return el;
}
- else
+ else {
this.write(stanza);
+ return stanza;
+ }
};
Connection.prototype.startParser = function() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list