From e62bfadb76fe78619c76a37e7bc649b9c765accc Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Fri, 3 Nov 2023 20:53:19 +0000 Subject: [PATCH] fix sessionrecording for not indexing (#5490) --- meshdesktopmultiplex.js | 4 ++-- meshrelay.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshdesktopmultiplex.js b/meshdesktopmultiplex.js index 80bcad27..b7888f9a 100644 --- a/meshdesktopmultiplex.js +++ b/meshdesktopmultiplex.js @@ -342,7 +342,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, id, func) { parent.parent.fs.close(fd); // Now that the recording file is closed, check if we need to index this file. - if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', filename); } + if (domain.sessionrecording.index && domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', filename); } // Add a event entry about this recording var basefile = parent.parent.path.basename(filename); @@ -1436,4 +1436,4 @@ a given size and timestamp. When looking at network traffic the flags are import - If traffic has the first (0x0001) flag set, the data is binary otherwise it's a string. - If the traffic has the second (0x0002) flag set, traffic is coming from the user's browser, if not, it's coming from the MeshAgent. -*/ \ No newline at end of file +*/ diff --git a/meshrelay.js b/meshrelay.js index be957f2c..dc70e5d7 100644 --- a/meshrelay.js +++ b/meshrelay.js @@ -745,7 +745,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) { parent.parent.fs.close(logfile.fd); // Now that the recording file is closed, check if we need to index this file. - if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); } + if (domain.sessionrecording.index && domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); } // Compute session length var sessionLength = null;