fix sessionrecording for not indexing (#5490)

Simon Smith committed Nov 3, 2023 at 20:53 UTC e62bfadb76fe78619c76a37e7bc649b9c765accc
2 files changed +3 -3
meshdesktopmultiplex.js
+2 -2
@@ -342,7 +342,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, id, func) {
342 parent.parent.fs.close(fd);
343
344 // Now that the recording file is closed, check if we need to index this file.
345 - if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', filename); }
345 + if (domain.sessionrecording.index && domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', filename); }
346
347 // Add a event entry about this recording
348 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
1436
1437 - If traffic has the first (0x0001) flag set, the data is binary otherwise it's a string.
1438 - 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.
1439 -*/
\ No newline at end of file
1439 +*/
meshrelay.js
+1 -1
@@ -745,7 +745,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
745 parent.parent.fs.close(logfile.fd);
746
747 // Now that the recording file is closed, check if we need to index this file.
748 - if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); }
748 + if (domain.sessionrecording.index && domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); }
749
750 // Compute session length
751 var sessionLength = null;