Skip to content

Commit

Permalink
tiny things
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Askarov committed Oct 29, 2019
1 parent b5741ec commit 3f502cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/helpers/lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports.safeLog = function(msg, modes) {
// In dangerous mode hex dump is available
if (global.c.dangerous && modes.indexOf('hex') >=0) {
var result = msg.toString('hex');
//return result;

len = result.length;
for (var i = 0; i < len; i += 2) {
if (i) {
Expand Down
5 changes: 2 additions & 3 deletions lib/socketServer/lib/clientHttpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var maxConnections = 100;
// Todo: proper initialization with no hardcode
var hexFields = [52,55];


function clientHttpServer(upstream, c) {
this.noMore = false;

Expand Down Expand Up @@ -42,7 +41,7 @@ function clientHttpServer(upstream, c) {
if (this.isRawMode) {
var msg = p.getRawMessage().toString('hex');
} else {
var msg = prepareObjectDadaOut(p.getFields());
var msg = prepareObjectDataOut(p.getFields());
}

this.sendReply(msg);
Expand Down Expand Up @@ -186,7 +185,7 @@ function prepareObjectDataIn(data) {
}

// Do data transition before sending out
function prepareObjectDadaOut(data) {
function prepareObjectDataOut(data) {
for (var i in hexFields) {
if (data.hasOwnProperty(hexFields[i])) {
if (typeof data[hexFields[i]] == 'object' && data[hexFields[i]] instanceof Buffer) {
Expand Down

0 comments on commit 3f502cb

Please sign in to comment.