1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-06 00:13:33 +00:00

fixes for upload #99

delete unused file,
increase upload speed size,
fix random crashing
This commit is contained in:
Simon Smith
2024-08-27 19:40:16 +01:00
parent 61ae81dfde
commit f24b120f5b
3 changed files with 4 additions and 1158 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1539,7 +1539,7 @@ namespace MeshCentralRouter
private void uploadNextPart(bool dataPriming)
{
if(uploadActive == false) return;
byte[] buffer = new byte[16385];
byte[] buffer = new byte[65565];
int len = uploadFileStream.Read(buffer, 1, buffer.Length - 1);
if(dataPriming && (len == 0)) return;
uploadFilePtr += len;

View File

@@ -965,7 +965,9 @@ namespace MeshCentralRouter
private IntPtr captureKey(int nCode, IntPtr wp, IntPtr lp)
{
bool bIsForegroundWindow = false;
try { bIsForegroundWindow = GetForegroundWindow() == this.ParentForm.Handle; } catch { }
if(this.ParentForm != null) {
try { bIsForegroundWindow = GetForegroundWindow() == this.ParentForm.Handle; } catch { }
}
if(nCode >= 0 && bIsForegroundWindow)
{
KBDLLHOOKSTRUCT objKeyInfo = (KBDLLHOOKSTRUCT)Marshal.PtrToStructure(lp, typeof(KBDLLHOOKSTRUCT));