Added session recording debug.
This commit is contained in:
parent
d7517b3dd2
commit
832cc67436
|
@ -640,8 +640,13 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
||||||
recFullFilename = parent.parent.path.join(parent.parent.recordpath, recFilename);
|
recFullFilename = parent.parent.path.join(parent.parent.recordpath, recFilename);
|
||||||
}
|
}
|
||||||
parent.parent.fs.open(recFullFilename, 'w', function (err, fd) {
|
parent.parent.fs.open(recFullFilename, 'w', function (err, fd) {
|
||||||
if (err != null) { func(false); return; }
|
if (err != null) {
|
||||||
|
parent.parent.debug('relay', 'Relay: Unable to record to file: ' + recFullFilename);
|
||||||
|
func(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Write the recording file header
|
// Write the recording file header
|
||||||
|
parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
|
||||||
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, nodeid: obj.nodeid, time: new Date().toLocaleString(), protocol: 2 };
|
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, nodeid: obj.nodeid, time: new Date().toLocaleString(), protocol: 2 };
|
||||||
var firstBlock = JSON.stringify(metadata);
|
var firstBlock = JSON.stringify(metadata);
|
||||||
recordingEntry(fd, 1, 0, firstBlock, function () {
|
recordingEntry(fd, 1, 0, firstBlock, function () {
|
||||||
|
|
|
@ -241,10 +241,12 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
||||||
parent.parent.fs.open(recFullFilename, 'w', function (err, fd) {
|
parent.parent.fs.open(recFullFilename, 'w', function (err, fd) {
|
||||||
if (err != null) {
|
if (err != null) {
|
||||||
// Unable to record
|
// Unable to record
|
||||||
|
parent.parent.debug('relay', 'Relay: Unable to record to file: ' + recFullFilename);
|
||||||
try { ws.send('c'); } catch (ex) { } // Send connect to both peers
|
try { ws.send('c'); } catch (ex) { } // Send connect to both peers
|
||||||
try { relayinfo.peer1.ws.send('c'); } catch (ex) { }
|
try { relayinfo.peer1.ws.send('c'); } catch (ex) { }
|
||||||
} else {
|
} else {
|
||||||
// Write the recording file header
|
// Write the recording file header
|
||||||
|
parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
|
||||||
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, userid: sessionUser._id, username: sessionUser.name, sessionid: obj.id, ipaddr1: cleanRemoteAddr(obj.req.ip), ipaddr2: cleanRemoteAddr(obj.peer.req.ip), time: new Date().toLocaleString(), protocol: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.p), nodeid: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.nodeid ) };
|
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, userid: sessionUser._id, username: sessionUser.name, sessionid: obj.id, ipaddr1: cleanRemoteAddr(obj.req.ip), ipaddr2: cleanRemoteAddr(obj.peer.req.ip), time: new Date().toLocaleString(), protocol: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.p), nodeid: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.nodeid ) };
|
||||||
if (xdevicename2 != null) { metadata.devicename = xdevicename2; }
|
if (xdevicename2 != null) { metadata.devicename = xdevicename2; }
|
||||||
var firstBlock = JSON.stringify(metadata);
|
var firstBlock = JSON.stringify(metadata);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
Loading…
Reference in New Issue