removing debug log

This commit is contained in:
Rodolphe Breard 2012-10-21 23:48:41 +02:00
parent 11d236eb9f
commit 26a273240a

View file

@ -36,17 +36,12 @@ NsClient.prototype.connect = function() {
auth += infos.login + " "; auth += infos.login + " ";
auth += hex_md5(data[2] + "-" + data[3] + "/" + data[4] + infos.pwd_socks) + " "; auth += hex_md5(data[2] + "-" + data[3] + "/" + data[4] + infos.pwd_socks) + " ";
auth += "chromesoul chromesoul\n"; auth += "chromesoul chromesoul\n";
console.log("recv: " + ab2str(rd_inf.data));
console.log("sent: auth_ag ext_user none none\n");
chrome.socket.write(elem.socket, str2ab("auth_ag ext_user none none\n"), function(w_inf) { chrome.socket.write(elem.socket, str2ab("auth_ag ext_user none none\n"), function(w_inf) {
chrome.socket.read(elem.socket, null, function(rd_inf) { chrome.socket.read(elem.socket, null, function(rd_inf) {
if (rd_inf.resultCode > 0) { if (rd_inf.resultCode > 0) {
console.log("recv: " + ab2str(rd_inf.data));
console.log("sent: " + auth);
chrome.socket.write(elem.socket, str2ab(auth), function(w_inf) { chrome.socket.write(elem.socket, str2ab(auth), function(w_inf) {
chrome.socket.read(elem.socket, null, function(rd_inf) { chrome.socket.read(elem.socket, null, function(rd_inf) {
if (rd_inf.resultCode > 0) { if (rd_inf.resultCode > 0) {
console.log("recv: " + ab2str(rd_inf.data));
elem.is_connected = true; elem.is_connected = true;
console.info("connected to the netsoul server"); console.info("connected to the netsoul server");
elem.updateStatus(); elem.updateStatus();
@ -87,9 +82,8 @@ NsClient.prototype.daemonize = function() {
return function(rd_inf) { return function(rd_inf) {
if (rd_inf.resultCode > 0) { if (rd_inf.resultCode > 0) {
var data = ab2str(rd_inf.data); var data = ab2str(rd_inf.data);
console.log("- recv: " + data);
if (data.substr(0, 5) === "ping ") { if (data.substr(0, 5) === "ping ") {
console.log("- sent: " + data);
chrome.socket.write(elem.socket, rd_inf.data, function(w_inf) { chrome.socket.write(elem.socket, rd_inf.data, function(w_inf) {
chrome.socket.read(elem.socket, null, this); chrome.socket.read(elem.socket, null, this);
}); });
@ -110,7 +104,6 @@ NsClient.prototype.updateStatus = function() {
var status_msg = "user_cmd state "; var status_msg = "user_cmd state ";
status_msg += this.state + ":"; status_msg += this.state + ":";
status_msg += Math.round(new Date().getTime() / 1000) + "\n"; status_msg += Math.round(new Date().getTime() / 1000) + "\n";
console.log("+send: " + status_msg);
chrome.socket.write(this.socket, str2ab(status_msg), function(w_inf) {}); chrome.socket.write(this.socket, str2ab(status_msg), function(w_inf) {});
} else { } else {
console.warn("not connected"); console.warn("not connected");