[Pkg-javascript-commits] [ltx] 149/469: untabify
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:01:17 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 16b55d7d632d89fb8b211d54a1fdb816285e5a5a
Author: Astro <astro at spaceboyz.net>
Date: Mon Oct 11 18:33:11 2010 +0200
untabify
---
lib/idle_timeout.js | 14 +++++++-------
lib/stream_shaper.js | 24 ++++++++++++------------
lib/xmpp/client.js | 12 ++++++------
lib/xmpp/sasl.js | 26 +++++++++++++-------------
4 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/lib/idle_timeout.js b/lib/idle_timeout.js
index 2e6399b..50a84e7 100644
--- a/lib/idle_timeout.js
+++ b/lib/idle_timeout.js
@@ -7,19 +7,19 @@
exports.attach = function(stream, timeout) {
var timer;
var emitTimeout = function() {
- timer = undefined;
- stream.emit('timeout');
+ timer = undefined;
+ stream.emit('timeout');
};
var updateTimer = function() {
- if (timer)
- clearTimeout(timer);
- timer = setTimeout(emitTimeout, timeout);
+ if (timer)
+ clearTimeout(timer);
+ timer = setTimeout(emitTimeout, timeout);
};
var oldWrite = stream.write;
stream.write = function() {
- updateTimer();
- oldWrite.apply(this, arguments);
+ updateTimer();
+ oldWrite.apply(this, arguments);
};
stream.addListener('data', updateTimer);
};
diff --git a/lib/stream_shaper.js b/lib/stream_shaper.js
index 1108548..ef03831 100644
--- a/lib/stream_shaper.js
+++ b/lib/stream_shaper.js
@@ -7,19 +7,19 @@ exports.attach = function(stream, rateLimit) {
var timer;
stream.rateLimit = rateLimit; // makes it readjustable after attachment
stream.addListener('data', function(data) {
- if (timer)
- clearTimeout(timer);
+ if (timer)
+ clearTimeout(timer);
- stream.pause();
- var sleep = Math.floor(data.length / stream.rateLimit);
- timer = setTimeout(function() {
- timer = undefined;
- stream.resume();
- }, sleep);
- });
+ stream.pause();
+ var sleep = Math.floor(data.length / stream.rateLimit);
+ timer = setTimeout(function() {
+ timer = undefined;
+ stream.resume();
+ }, sleep);
+ });
stream.addListener('close', function() {
- // don't let the last timeout inhibit node shutdown
- if (timer)
- clearTimeout(timeout);
+ // don't let the last timeout inhibit node shutdown
+ if (timer)
+ clearTimeout(timeout);
});
};
diff --git a/lib/xmpp/client.js b/lib/xmpp/client.js
index 8f34bf4..a5fb6f4 100644
--- a/lib/xmpp/client.js
+++ b/lib/xmpp/client.js
@@ -35,9 +35,9 @@ function Client(params) {
else
this.jid = params.jid;
this.password = params.password;
- this.api_key = params.api_key;
- this.secret_key = params.secret_key;
- this.session_key = params.session_key;
+ this.api_key = params.api_key;
+ this.secret_key = params.secret_key;
+ this.session_key = params.session_key;
this.xmlns[''] = NS_CLIENT;
this.xmppVersion = "1.0";
this.streamTo = this.jid.domain;
@@ -149,9 +149,9 @@ Client.prototype.useFeatures = function() {
this.mech.authzid = this.jid.bare().toString();
this.mech.authcid = this.jid.user;
this.mech.password = this.password;
- this.mech.api_key = this.api_key;
- this.mech.secret_key = this.secret_key;
- this.mech.session_key = this.session_key;
+ this.mech.api_key = this.api_key;
+ this.mech.secret_key = this.secret_key;
+ this.mech.session_key = this.session_key;
this.mech.realm = this.jid.domain; // anything?
this.mech.digest_uri = "xmpp/" + this.jid.domain;
var authMsg = encode64(this.mech.auth());
diff --git a/lib/xmpp/sasl.js b/lib/xmpp/sasl.js
index afad90a..9ff35ff 100644
--- a/lib/xmpp/sasl.js
+++ b/lib/xmpp/sasl.js
@@ -39,28 +39,28 @@ function XFacebookPlatform() {
this.cnonce = generateNonce();
this.challenge = function(s) {
- dict = require('querystring').parse(s);
+ dict = require('querystring').parse(s);
this.nonce_count++;
var response = {
- api_key: this.api_key,
- call_id: new Date().getTime(),
- method: dict.method,
+ api_key: this.api_key,
+ call_id: new Date().getTime(),
+ method: dict.method,
nonce: dict.nonce,
- session_key: this.session_key,
- v: "1.0"
+ session_key: this.session_key,
+ v: "1.0"
};
- var message = '';
- ['api_key','call_id','method','nonce','session_key','v'].forEach(function(v) {
- message += v + "=" + response[v];
- });
+ var message = '';
+ ['api_key','call_id','method','nonce','session_key','v'].forEach(function(v) {
+ message += v + "=" + response[v];
+ });
- response.sig = md5(message + this.secret_key, 'hex');
-
+ response.sig = md5(message + this.secret_key, 'hex');
+
return require('querystring').stringify(response);
- };
+ };
}
function Anonymous() {
--
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