Skip to content
Snippets Groups Projects
Commit 73f246dc authored by deuce's avatar deuce
Browse files

Add an auth_cb to the connect method as well. This is needed so that the

caller can addFiles() after the address list is received, hopefully knowing
if it's a secure session or not.
parent b0c93ebb
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,12 @@ BinkP.prototype.parseArgs = function(data)
ret[i] = this.unescapeFileName(ret[i]);
return ret;
};
BinkP.prototype.connect = function(addr, password, port)
/*
* auth_cb(response) is called to add files the response parameter is the
* parameter string send with the M_OK message... hopefully either "secure"
* or "non-secure"
*/
BinkP.prototype.connect = function(addr, password, auth_cb, port)
{
var pkt;
......@@ -248,6 +253,8 @@ BinkP.prototype.connect = function(addr, password, port)
return false;
}
auth_cb(this.authenticated);
if (js.terminated) {
this.close();
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment