Skip to content

Commit

Permalink
fix: syntax and added log message
Browse files Browse the repository at this point in the history
  • Loading branch information
kernow committed Nov 19, 2009
1 parent 6a92db5 commit 93e4678
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/connection.js
Expand Up @@ -10,7 +10,7 @@ Babylon.Connection.prototype.connect = function(jid, password) {
var that = this;
this.jid = jid;
this.password = password;
this.connection.connect(this.jid, this.password, function(s,e){that.on_connect(s,e)})
this.connection.connect(this.jid, this.password, function(s,e){that.on_connect(s,e)});
};

// erase the cookie
Expand Down Expand Up @@ -93,6 +93,7 @@ Babylon.Connection.prototype.on_connect = function(status, err) {
break;

case Strophe.Status.CONNECTED:
Babylon.log.debug("status: connected");
var that = this;
// We want to receive ALL stanzas from strophe, un filtered
this.write_cookie();
Expand Down
6 changes: 3 additions & 3 deletions lib/runner.js
Expand Up @@ -13,8 +13,8 @@ Babylon.Runner.prototype.run = function(config){
var status_handler = new Babylon.StatusHandler(this.router, this.observer);
Babylon.Runner.connection = new Babylon.Connection(config["host"], status_handler);
var cookie = Babylon.Runner.connection.read_cookie();

if(Babylon.config["attach"] && cookie && cookie != ""){
if(Babylon.config["attach"] && cookie && cookie !== ""){
Babylon.Runner.connection.reattach();
} else {
Babylon.Runner.connection.connect(config["jid"], config["password"]);
Expand All @@ -27,7 +27,7 @@ Babylon.Runner.prototype.stop = function() {

Babylon.Runner.prototype.raise = function(name, args){
this.router.raise(name, args);
}
};

Babylon.Runner.prototype.connected = function() {
return Babylon.Runner.connection.connected;
Expand Down

0 comments on commit 93e4678

Please sign in to comment.