recording not recoding

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Feb 27, 2025 at 18:35 UTC 7faf043c3518474b6c00c01fd9f8245395303860
3 files changed +6 -6
mcrec.js
+1 -1
@@ -321,7 +321,7 @@ function setup() { InstallModules(['image-size'], start); }
321 function start() { startEx(process.argv); }
322 function startEx(argv) {
323 if (argv.length > 2) { indexFile(argv[2]); } else {
324 - log("MeshCentral Session Recodings Processor");
324 + log("MeshCentral Session Recordings Processor");
325 log("This tool will index a .mcrec file so that the player can seek thru the file.");
326 log("");
327 log(" Usage: node mcrec [file]");
meshdesktopmultiplex.js
+1 -1
@@ -847,7 +847,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, id, func) {
847 return;
848 }
849 // Write the recording file header
850 - parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
850 + parent.parent.debug('relay', 'Relay: Started recording to file: ' + recFullFilename);
851 var metadata = { magic: 'MeshCentralRelaySession', ver: 1, nodeid: obj.nodeid, meshid: obj.meshid, time: new Date().toLocaleString(), protocol: 2, devicename: obj.name, devicegroup: obj.meshname };
852 var firstBlock = JSON.stringify(metadata);
853 recordingEntry(fd, 1, 0, firstBlock, function () {
meshrelay.js
+4 -4
@@ -445,15 +445,15 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
445 relayinfo.peer1.sendPeerImage();
446 } else {
447 // Write the recording file header
448 - parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
448 + parent.parent.debug('relay', 'Relay: Started recording to file: ' + recFullFilename);
449 var metadata = {
450 magic: 'MeshCentralRelaySession',
451 ver: 1,
452 userid: sessionUser._id,
453 username: sessionUser.name,
454 sessionid: obj.id,
455 - ipaddr1: (obj.req == null) ? null : obj.req.clientIp,
456 - ipaddr2: ((obj.peer == null) || (obj.peer.req == null)) ? null : obj.peer.req.clientIp,
455 + ipaddr1: ((obj.peer == null) || (obj.peer.req == null)) ? null : obj.peer.req.clientIp,
456 + ipaddr2: (obj.req == null) ? null : obj.req.clientIp,
457 time: new Date().toLocaleString(),
458 protocol: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.p),
459 nodeid: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.nodeid)
@@ -512,7 +512,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
512 if (obj.req.query.p == 1) { msg = 'Started terminal session'; msgid = 14; }
513 else if (obj.req.query.p == 2) { msg = 'Started desktop session'; msgid = 15; }
514 else if (obj.req.query.p == 5) { msg = 'Started file management session'; msgid = 16; }
515 - var event = { etype: 'relay', action: 'relaylog', domain: domain.id, userid: sessionUser._id, username: sessionUser.name, msgid: msgid, msgArgs: [obj.id, req.clientIp, obj.peer.req.clientIp], msg: msg + ' \"' + obj.id + '\" from ' + req.clientIp + ' to ' + obj.peer.req.clientIp, protocol: req.query.p, nodeid: req.query.nodeid };
515 + var event = { etype: 'relay', action: 'relaylog', domain: domain.id, userid: sessionUser._id, username: sessionUser.name, msgid: msgid, msgArgs: [obj.id, obj.peer.req.clientIp, req.clientIp], msg: msg + ' \"' + obj.id + '\" from ' + obj.peer.req.clientIp + ' to ' + req.clientIp, protocol: req.query.p, nodeid: req.query.nodeid };
516 if (obj.guestname) { event.guestname = obj.guestname; } else if (relayinfo.peer1.guestname) { event.guestname = relayinfo.peer1.guestname; } // If this is a sharing session, set the guest name here.
517 parent.parent.DispatchEvent(['*', sessionUser._id], obj, event);
518