From 9c522011f6b0f2386db0ac3605cddfeedcc7f814 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 25 Apr 2019 17:25:06 -0700 Subject: [PATCH] Minor MeshCommander fix --- amt/amt-redir-mesh.js | 4 ++-- public/commander.htm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/amt/amt-redir-mesh.js b/amt/amt-redir-mesh.js index c116d9b4..6e84cb28 100644 --- a/amt/amt-redir-mesh.js +++ b/amt/amt-redir-mesh.js @@ -456,8 +456,8 @@ module.exports.CreateAmtRedirect = function (module, domain, user, webserver, me obj.xxSend = function (x) { if (obj.redirTrace) { console.log("REDIR-SEND(" + x.length + "): " + new Buffer(x, "binary").toString('hex'), typeof x); } //obj.Debug("Send(" + x.length + "): " + webserver.common.rstr2hex(x)); - obj.forwardclient.write(x); // FIXES CIRA - //obj.forwardclient.write(new Buffer(x, "binary")); + //obj.forwardclient.write(x); // FIXES CIRA + obj.forwardclient.write(new Buffer(x, "binary")); } obj.Send = function (x) { diff --git a/public/commander.htm b/public/commander.htm index 11602817..03cc6912 100644 --- a/public/commander.htm +++ b/public/commander.htm @@ -1181,7 +1181,7 @@ function iderStart(){var b;b='
Mount disk images on a Intel® AMT compute setDialogMode(11,"Storage Redirection",3,iderStart2,b);if(b=localStorage.getItem("iderurl"))Q("storageserverurl").value=b.substring(1,b.length-1)} function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImageInput").files.length)messagebox("Storage Redirection Error","At least one disk image file must be selected.");else if(1==Q("floppyImageInput").files.length&&0!=Q("floppyImageInput").files[0].size%512)messagebox("Storage Redirection Error","Invalid .img file.");else if(1==Q("cdromImageInput").files.length&&0!=Q("cdromImageInput").files[0].size%2048)messagebox("Storage Redirection Error","Invalid .iso file.");else{var b= null,c=null;1==Q("floppyImageInput").files.length&&(b=Q("floppyImageInput").files[0]);1==Q("cdromImageInput").files.length&&(c=Q("cdromImageInput").files[0]);iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=Q("iderStartType").value;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0)}} -function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)} +function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)} function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,""+(ider.m.server?"Server ":"")+"IDE-R Session, Connected, "+ider.m.bytesFromAmt+" in, "+ider.m.bytesToAmt+" out.")}var heatMapWidth=600,heatMapDividor={}; function iderSectorStats(b,c,a,d,e){var q=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),k=q.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0CDROM, blocks are "+2048*heatMapDividor[c]+" bytes.")):(QV("floppyHeatMap",a),QH("floppyHeatMapText","Floppy, blocks are "+512*heatMapDividor[c]+" bytes."))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)q.height=6*(Math.floor(a/(heatMapWidth/ 6))+(a%heatMapWidth?1:0)),k.fillStyle="rgba(225,250,225,1)",k.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&k.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),k.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b