[Pkg-javascript-commits] [ltx] 95/469: client & component: fix Connection.prototype.startStream() invokation
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:01:07 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 2af5a12d60bede5f8b501e25e292c02abd3025c3
Author: Astro <astro at spaceboyz.net>
Date: Mon Sep 6 21:10:34 2010 +0200
client & component: fix Connection.prototype.startStream() invokation
---
lib/xmpp/client.js | 2 +-
lib/xmpp/component.js | 2 +-
lib/xmpp/connection.js | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/xmpp/client.js b/lib/xmpp/client.js
index 50394f5..0479ebe 100644
--- a/lib/xmpp/client.js
+++ b/lib/xmpp/client.js
@@ -78,7 +78,7 @@ sys.inherits(Client, Connection.Connection);
exports.Client = Client;
Client.prototype.startStream = function() {
- Connection.prototype.startStream.call(this);
+ Connection.Connection.prototype.startStream.call(this);
var tag = "<stream:stream xmlns='" + this.xmlns +
"' xmlns:stream='" + Connection.NS_STREAM + "'" +
diff --git a/lib/xmpp/component.js b/lib/xmpp/component.js
index a422606..7e3b1f4 100644
--- a/lib/xmpp/component.js
+++ b/lib/xmpp/component.js
@@ -45,7 +45,7 @@ Component.prototype.onStreamStart = function(streamAttrs) {
};
Component.prototype.startStream = function() {
- Connection.prototype.startStream.call(this);
+ Connection.Connection.prototype.startStream.call(this);
var tag = "<stream:stream xmlns='" + this.xmlns +
"' xmlns:stream='" + Connection.NS_STREAM + "'" +
diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index a291cc9..d18a4f3 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -74,6 +74,7 @@ Connection.prototype.startParser = function() {
self.parser = new expat.Parser(self.charset);
self.parser.addListener('startElement', function(name, attrs) {
+ // TODO: refuse anything but <stream:stream>
if (!self.element && name == 'stream:stream') {
self.streamAttrs = attrs;
/* We need those xmlns often, store them extra */
--
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