[Pkg-javascript-commits] [ltx] 130/469: rm debug output
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:01:13 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 d38955ca0b1e79a1313ab815956134c676a9a8e9
Author: Astro <astro at spaceboyz.net>
Date: Thu Sep 9 20:07:11 2010 +0200
rm debug output
---
lib/xmpp/connection.js | 1 -
lib/xmpp/router.js | 25 -------------------------
lib/xmpp/server.js | 4 ----
lib/xmpp/srv.js | 4 ----
4 files changed, 34 deletions(-)
diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index d7c7ff4..e2b6b73 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -59,7 +59,6 @@ Connection.prototype.send = function(stanza) {
el.write(function(s) { socket.write(s); });
return el;
} else {
- console.log({write:stanza});
this.socket.write(stanza);
return stanza;
}
diff --git a/lib/xmpp/router.js b/lib/xmpp/router.js
index fb9ceff..0c0cb78 100644
--- a/lib/xmpp/router.js
+++ b/lib/xmpp/router.js
@@ -11,23 +11,6 @@ var NS_XMPP_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl';
var NS_XMPP_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas';
-dbgStream = function(tag, stream) {
- stream.socket.on('data', function(data) {
- console.log(tag + ' in: ' + data);
- });
- stream.on('error', function(e) {
- console.log(tag + ' error: ' + e.stack ? e.stack : e);
- });
- stream.on('close', function() {
- console.log(tag + ' close');
- });
- var oldSend = stream.send;
- stream.send = function(data) {
- console.log(tag + ' out: ' + data);
- oldSend.call(stream, data);
- };
-};
-
/**
* Represents a domain we host with connections to federated servers
*/
@@ -110,12 +93,10 @@ DomainContext.prototype.getOutStream = function(destDomain) {
// There's one already
return this.s2sOut[destDomain];
} else {
- console.log("OUTGOING to " + destDomain);
var credentials = this.router.credentials[this.domain];
// Setup a new outgoing connection
var outStream = new Server.OutgoingServer(this.domain, destDomain, credentials);
this.s2sOut[destDomain] = outStream;
- dbgStream('outgoing', outStream);
this.router.setupStream(outStream);
this.setupStream(destDomain, outStream);
@@ -146,7 +127,6 @@ DomainContext.prototype.getOutStream = function(destDomain) {
outStream.addListener('error', closeCb);
var onAuth = function(method) {
- console.log({auth:method});
outStream.isConnected = true;
switch(method) {
case 'dialback':
@@ -160,7 +140,6 @@ DomainContext.prototype.getOutStream = function(destDomain) {
);
var onStanza;
onStanza = function(stanza) {
- console.log({external:{domain:destDomain,stanza:stanza.toString()}});
if (stanza.is('success', NS_XMPP_SASL)) {
outStream.startParser();
outStream.startStream();
@@ -186,7 +165,6 @@ DomainContext.prototype.getOutStream = function(destDomain) {
outStream.addListener('auth', onAuth);
outStream.addListener('online', function() {
- console.log('ONLINE!');
outStream.isAuthed = true;
if (outStream.queue) {
outStream.queue.forEach(function(stanza) {
@@ -395,7 +373,6 @@ function Router(s2sPort) {
this.ctxs = {};
net.createServer(function(inStream) {
- console.log('INCOMING from ' + inStream.remoteAddress);
self.acceptConnection(inStream);
}).listen(s2sPort || 5269);
}
@@ -425,7 +402,6 @@ Router.prototype.acceptConnection = function(socket) {
var inStream = new Server.IncomingServer(socket, this.credentials);
this.setupStream(inStream);
- dbgStream('incoming', inStream);
// incoming server wants to verify an outgoing connection of ours
inStream.addListener('dialbackVerify', function(from, to, id, key) {
@@ -480,7 +456,6 @@ Router.prototype.unregister = function(domain) {
if (this.hasContext(domain)) {
this.ctxs[domain].end();
-console.log('deleting '+domain);
delete this.ctxs[domain];
}
};
diff --git a/lib/xmpp/server.js b/lib/xmpp/server.js
index de37f11..d348d87 100644
--- a/lib/xmpp/server.js
+++ b/lib/xmpp/server.js
@@ -23,7 +23,6 @@ function Server(socket) {
this.xmlns['db'] = NS_DIALBACK;
this.xmppVersion = '1.0';
-console.log({Server:this});
this.addListener('rawStanza', function(stanza) {
var key = stanza.getText();
@@ -94,7 +93,6 @@ exports.IncomingServer = function(stream, credentials) {
this.streamId = generateId();
this.addListener('streamStart', function(streamAttrs) {
-console.log({streamAttrs:streamAttrs,credentials:credentials});
if (streamAttrs.to &&
credentials &&
credentials.hasOwnProperty(streamAttrs.to))
@@ -138,7 +136,6 @@ exports.OutgoingServer = function(srcDomain, destDomain, credentials) {
this.credentials = credentials;
// No credentials means we cannot <starttls/> on the server
// side. Unfortunately this is required for XMPP 1.0.
-console.log({outCreds:self.credentials});
if (!this.credentials)
delete this.xmppVersion;
@@ -175,7 +172,6 @@ console.log({outCreds:self.credentials});
self.startStream();
});
attempt.addListener('error', function(e) {
- console.log({attemptError:e});
self.emit('error', e);
});
};
diff --git a/lib/xmpp/srv.js b/lib/xmpp/srv.js
index df51643..c3826c9 100644
--- a/lib/xmpp/srv.js
+++ b/lib/xmpp/srv.js
@@ -43,7 +43,6 @@ function groupSrvRecords(addrs) {
function resolveSrv(name, cb) {
dns.resolveSrv(name, function(err, addrs) {
-console.log({resolveSrv:[name,err,addrs]});
if (err) {
/* no SRV record, try domain as A */
cb(err);
@@ -53,7 +52,6 @@ console.log({resolveSrv:[name,err,addrs]});
error = error || e;
results = results.concat(addrs1);
pending--;
- console.log({results:results,error:error,pending:pending});
if (pending < 1) {
cb(results ? null : error, results);
}
@@ -77,7 +75,6 @@ console.log({resolveSrv:[name,err,addrs]});
function resolveHost(name, cb) {
var error, results = [], pending = 2;
var cb1 = function(e, addrs) {
-console.log({resolveHost:[name,e,addrs]});
error = error || e;
var addr = addrs && addrs[Math.floor(Math.random() * addrs.length)];
if (addr)
@@ -94,7 +91,6 @@ console.log({resolveHost:[name,e,addrs]});
// connection attempts to multiple addresses in a row
function tryConnect(socket, addrs, listener) {
-console.log({tryConnect:addrs});
var onConnect = function() {
socket.removeListener('connect', onConnect);
socket.removeListener('error', onError);
--
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