因为易崩而弃用lz4
1、发现使用lz4压缩库时监控端程序进行远程桌面操作时容易崩溃,原因不明。 2、修复内存泄漏缺陷,在throw "Bad Buffer"的情况需要释放申请的内存。
This commit is contained in:
@@ -109,3 +109,9 @@
|
|||||||
1、整理部分垃圾代码。
|
1、整理部分垃圾代码。
|
||||||
|
|
||||||
2、发布V1.0.0.2。
|
2、发布V1.0.0.2。
|
||||||
|
|
||||||
|
2018.1.19
|
||||||
|
|
||||||
|
1、发现使用lz4压缩库时监控端程序进行远程桌面操作时容易崩溃,原因不明。
|
||||||
|
|
||||||
|
2、修复内存泄漏缺陷,在throw "Bad Buffer"的情况需要释放申请的内存。
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ VOID IOCPClient::OnServerReceiving(char* szBuffer, ULONG ulLength)
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
printf("[ERROR] uncompress failed \n");
|
printf("[ERROR] uncompress failed \n");
|
||||||
|
delete [] CompressedBuffer;
|
||||||
|
delete [] DeCompressedBuffer;
|
||||||
throw "Bad Buffer";
|
throw "Bad Buffer";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,13 @@ DWORD WINAPI CScreenManager::WorkThreadProc(LPVOID lParam)
|
|||||||
|
|
||||||
clock_t last = clock();
|
clock_t last = clock();
|
||||||
This->SendFirstScreen();
|
This->SendFirstScreen();
|
||||||
|
#if USING_ZLIB
|
||||||
|
const int fps = 8;// ֡<><D6A1>
|
||||||
|
#elif USING_LZ4
|
||||||
const int fps = 12;// ֡<><D6A1>
|
const int fps = 12;// ֡<><D6A1>
|
||||||
|
#else
|
||||||
|
const int fps = 8;// ֡<><D6A1>
|
||||||
|
#endif
|
||||||
const int sleep = 1000 / fps;// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD>䣨ms<6D><73>
|
const int sleep = 1000 / fps;// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD>䣨ms<6D><73>
|
||||||
timeBeginPeriod(1);
|
timeBeginPeriod(1);
|
||||||
while (This->m_bIsWorking)
|
while (This->m_bIsWorking)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#if !USING_ZLIB
|
#if !USING_ZLIB
|
||||||
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
|
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
|
||||||
#define USING_LZ4 1
|
#define USING_LZ4 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _MSC_VER > 1000
|
#if _MSC_VER > 1000
|
||||||
|
|||||||
@@ -479,6 +479,8 @@ BOOL IOCPServer::OnClientReceiving(PCONTEXT_OBJECT ContextObject, DWORD dwTrans
|
|||||||
m_NotifyProc(ContextObject); //֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
|
m_NotifyProc(ContextObject); //֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
|
||||||
}else{
|
}else{
|
||||||
OutputDebugStringA("[ERROR] uncompress failed \n");
|
OutputDebugStringA("[ERROR] uncompress failed \n");
|
||||||
|
delete [] CompressedBuffer;
|
||||||
|
delete [] DeCompressedBuffer;
|
||||||
throw "Bad Buffer";
|
throw "Bad Buffer";
|
||||||
}
|
}
|
||||||
delete [] CompressedBuffer;
|
delete [] CompressedBuffer;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#if !USING_ZLIB
|
#if !USING_ZLIB
|
||||||
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
|
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
|
||||||
#define USING_LZ4 1
|
#define USING_LZ4 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _SECURE_ATL
|
#ifndef _SECURE_ATL
|
||||||
|
|||||||
Reference in New Issue
Block a user