add debuging
This commit is contained in:
@@ -10,6 +10,7 @@ class WTVClientCapabilities {
|
|||||||
|
|
||||||
capabilities = null;
|
capabilities = null;
|
||||||
capabilities_table = null;
|
capabilities_table = null;
|
||||||
|
debug = require('debug')('WTVClientCapabilities')
|
||||||
|
|
||||||
|
|
||||||
constructor(wtv_capability_flags = null) {
|
constructor(wtv_capability_flags = null) {
|
||||||
@@ -105,15 +106,9 @@ class WTVClientCapabilities {
|
|||||||
return binary;
|
return binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add .reverse() to strings for ease of processing
|
|
||||||
if (!String.prototype.reverse) {
|
|
||||||
String.prototype.reverse = function () {
|
|
||||||
return this.split("").reverse().reverseArray.join("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert wtv_capability_flags to binary string, reverse the string, and split into array containing each character;
|
// convert wtv_capability_flags to binary string, reverse the string, and split into array containing each character;
|
||||||
var bitfield = hex2bin(wtv_capability_flags).reverse().split("");
|
var bitfield = hex2bin(wtv_capability_flags).split("").reverse();
|
||||||
|
this.debug("bitfield:", bitfield)
|
||||||
|
|
||||||
var add = function (flag_name, flag) {
|
var add = function (flag_name, flag) {
|
||||||
capabilities[flag_name] = flag;
|
capabilities[flag_name] = flag;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ const WTVMail = require("./WTVMail.js")
|
|||||||
const WTVSec = require("./WTVSec.js");
|
const WTVSec = require("./WTVSec.js");
|
||||||
const WTVFavorites = require("./WTVFavorites.js");
|
const WTVFavorites = require("./WTVFavorites.js");
|
||||||
|
|
||||||
|
|
||||||
class WTVClientSessionData {
|
class WTVClientSessionData {
|
||||||
|
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
@@ -28,6 +27,7 @@ class WTVClientSessionData {
|
|||||||
clientAddress = null;
|
clientAddress = null;
|
||||||
user_id = 0;
|
user_id = 0;
|
||||||
cryptoKey = null;
|
cryptoKey = null;
|
||||||
|
debug = require('debug')('WTVClientSessionData')
|
||||||
|
|
||||||
constructor(minisrv_config, ssid) {
|
constructor(minisrv_config, ssid) {
|
||||||
if (!minisrv_config) throw ("minisrv_config required");
|
if (!minisrv_config) throw ("minisrv_config required");
|
||||||
|
|||||||
Reference in New Issue
Block a user