From e2cbc729c226647a660c3fa71f0475599987e8a1 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 12 Apr 2019 13:24:15 -0700 Subject: [PATCH] Fixed diagnostic agent 'log', to write log to correct ID --- meshagent.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshagent.js b/meshagent.js index 97edff29..971ee27a 100644 --- a/meshagent.js +++ b/meshagent.js @@ -1134,9 +1134,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { } case 'log': { // Only the diagnostic agent can do - if (((obj.agentInfo.capabilities & 0x40) != 0) && (typeof command.value.command.value == 'string') && (command.value.command.value.length < 256)) { + if (((obj.agentInfo.capabilities & 0x40) != 0) && (typeof command.value.value == 'string') && (command.value.value.length < 256)) + { // Log a value in the event log of the main again - var event = { etype: 'node', action: 'diagnostic', nodeid: obj.dbNodeKey, domain: domain.id, msg: command.value.command.value }; + var event = { etype: 'node', action: 'diagnostic', nodeid: obj.realNodeKey, domain: domain.id, msg: command.value.value }; parent.parent.DispatchEvent(['*', obj.dbMeshKey], obj, event); } break;