Skip to content

Commit 943a391

Browse files
committed
fix location crashing server #7626
Signed-off-by: si458 <simonsmith5521@gmail.com>
1 parent d30762e commit 943a391

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

meshagent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
19331933
if (!device.lastbootuptime) { device.lastbootuptime = ""; }
19341934
if (device.lastbootuptime != command.lastbootuptime) { /*changes.push('Last Boot Up Time');*/ device.lastbootuptime = command.lastbootuptime; change = 1; log = 1; }
19351935
}
1936-
if (command.idletime != null) { // Idle Time
1936+
if (command.idletime != null) { // Idle Time
19371937
if (!device.idletime) { device.idletime = 0; }
19381938
if (parseInt(device.idletime) != parseInt(command.idletime)) { /*changes.push('Idle Time');*/ device.idletime = parseInt(command.idletime); change = 1; } // Don't log idle time changes, this is too volatile.
19391939
}
@@ -1985,7 +1985,7 @@ if (command.idletime != null) { // Idle Time
19851985

19861986
// Change the current core information string and event it
19871987
function ChangeAgentLocationInfo(command) {
1988-
if (obj.agentInfo.capabilities & 0x40) return;
1988+
if ((obj.agentInfo == null) || (obj.agentInfo.capabilities & 0x40)) return;
19891989
if ((command == null) || (command == null)) { return; } // Safety, should never happen.
19901990

19911991
// Check that the mesh exists

0 commit comments

Comments
 (0)