From 4eb2510e2ed4ba92754c29623f0621fb0ad1ddbb Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 7 Jun 2019 09:44:39 -0700 Subject: [PATCH] Fixed server exception in MeshAgent. --- meshagent.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshagent.js b/meshagent.js index 5613e977..c0f12b98 100644 --- a/meshagent.js +++ b/meshagent.js @@ -696,11 +696,11 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { } } - completeAgentConnection3(device); + completeAgentConnection3(device, mesh); }); } - function completeAgentConnection2(device) { + function completeAgentConnection2() { // See if this mesh exists, if it does not we may want to create it. var mesh = getMeshAutoCreate(); @@ -736,10 +736,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { parent.parent.DispatchEvent(['*', obj.dbMeshKey], obj, { etype: 'node', action: 'addnode', node: device, msg: ('Added device ' + obj.agentInfo.computerName + ' to mesh ' + mesh.name), domain: domain.id }); } - completeAgentConnection3(device); + completeAgentConnection3(device, mesh); } - function completeAgentConnection3(device) { + function completeAgentConnection3(device, mesh) { // Check if this agent is already connected const dupAgent = parent.wsagents[obj.dbNodeKey]; parent.wsagents[obj.dbNodeKey] = obj; diff --git a/package.json b/package.json index af55d64e..d8e5db2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.3.6-c", + "version": "0.3.6-d", "keywords": [ "Remote Management", "Intel AMT",