Fixed typo, where an exception was thrown when trying to send server log, if user consent was enabled
Bryan Roe committed
Aug 5, 2019 at 15:13 UTC
c5aa73c35596fa541f1288cc27bfac472b187563
1 file changed
+6
-6
agents/meshcore.js
+6
-6
@@ -1072,7 +1072,7 @@ function createMeshCore(agent)
1072
pr.then(
1073
function () {
1074
// Success
1075
- MeshServerLog('Starting remote terminal after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest);
1075
+ MeshServerLog('Starting remote terminal after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1076
this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null }));
1077
if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 2)) {
1078
// User Notifications is required
@@ -1082,7 +1082,7 @@ function createMeshCore(agent)
1082
},
1083
function (e) {
1084
// User Consent Denied/Failed
1085
- MeshServerLog('Failed to start remote terminal after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest);
1085
+ MeshServerLog('Failed to start remote terminal after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1086
this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() }));
1087
this.ws.end();
1088
});
@@ -1163,7 +1163,7 @@ function createMeshCore(agent)
1163
function ()
1164
{
1165
// Success
1166
- MeshServerLog('Starting remote desktop after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest);
1166
+ MeshServerLog('Starting remote desktop after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1167
this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null }));
1168
if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 1)) {
1169
// User Notifications is required
@@ -1175,7 +1175,7 @@ function createMeshCore(agent)
1175
function (e)
1176
{
1177
// User Consent Denied/Failed
1178
- MeshServerLog('Failed to start remote desktop after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest);
1178
+ MeshServerLog('Failed to start remote desktop after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1179
this.ws.end(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() }));
1180
});
1181
}
@@ -1220,7 +1220,7 @@ function createMeshCore(agent)
1220
pr.then(
1221
function () {
1222
// Success
1223
- MeshServerLog('Starting remote files after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest);
1223
+ MeshServerLog('Starting remote files after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1224
this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null }));
1225
if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 4)) {
1226
// User Notifications is required
@@ -1230,7 +1230,7 @@ function createMeshCore(agent)
1230
},
1231
function (e) {
1232
// User Consent Denied/Failed
1233
- MeshServerLog('Failed to start remote files after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest);
1233
+ MeshServerLog('Failed to start remote files after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest);
1234
this.ws.end(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() }));
1235
});
1236
} else {