diff --git a/ReadMe.txt b/ReadMe.txt
index 68864a5..e0a2ae7 100644
--- a/ReadMe.txt
+++ b/ReadMe.txt
@@ -143,3 +143,7 @@
1、修复被控端消息提示对话框在消息换行时显示不完整的问题。
2、添加/完善录制远程被控端视频的功能。
+
+3、修复语音监听对话框显示已收到数据不更新状态的问题。
+
+4、发现"发送本地语音"会导致主控端容易崩溃的问题,现象类似于操作远程桌面时的随机崩溃。
diff --git a/client/AudioManager.cpp b/client/AudioManager.cpp
index 7e0656b..06e666d 100644
--- a/client/AudioManager.cpp
+++ b/client/AudioManager.cpp
@@ -44,12 +44,13 @@ VOID CAudioManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
{
case COMMAND_NEXT:
{
- NotifyDialogIsOpen();
+ if (1 == ulLength)
+ NotifyDialogIsOpen();
break;
}
default:
- {
- m_AudioObject->PlayBuffer(szBuffer, ulLength);
+ {
+ m_AudioObject->PlayBuffer(szBuffer, ulLength);
break;
}
}
@@ -83,6 +84,7 @@ BOOL CAudioManager::SendRecordBuffer()
szPacket[0] = TOKEN_AUDIO_DATA; //ض˷Ϣ
//ƻ
memcpy(szPacket + 1, szBuffer, dwBufferSize);
+ szPacket[dwBufferSize] = 0;
//ͳȥ
if (dwBufferSize > 0)
{
diff --git a/client/TestRun.vcxproj.user b/client/TestRun.vcxproj.user
index 9e8e47a..25eb3fe 100644
--- a/client/TestRun.vcxproj.user
+++ b/client/TestRun.vcxproj.user
@@ -7,6 +7,6 @@
C:\VM\Remoter
$(TargetDir)\TestRun.pdb;$(TargetDir)\ServerDll.dll;$(TargetDir)\ServerDll.pdb
false
- WindowsRemoteDebugger
+ WindowsLocalDebugger
\ No newline at end of file
diff --git a/server/2015Remote/2015Remote.rc b/server/2015Remote/2015Remote.rc
index 7bdbb10..87fde9a 100644
Binary files a/server/2015Remote/2015Remote.rc and b/server/2015Remote/2015Remote.rc differ
diff --git a/server/2015Remote/AudioDlg.cpp b/server/2015Remote/AudioDlg.cpp
index d946b78..1a9eb99 100644
--- a/server/2015Remote/AudioDlg.cpp
+++ b/server/2015Remote/AudioDlg.cpp
@@ -46,6 +46,7 @@ void CAudioDlg::DoDataExchange(CDataExchange* pDX)
BEGIN_MESSAGE_MAP(CAudioDlg, CDialog)
ON_WM_CLOSE()
+ ON_BN_CLICKED(IDC_CHECK, &CAudioDlg::OnBnClickedCheck)
END_MESSAGE_MAP()
@@ -70,6 +71,9 @@ BOOL CAudioDlg::OnInitDialog()
m_bThreadRun = m_hWorkThread ? TRUE : FALSE;
+ // "ͱ"ᵼ±"OnBnClickedCheck"
+ GetDlgItem(IDC_CHECK)->EnableWindow(FALSE);
+
return TRUE; // return TRUE unless you set the focus to a control
// 쳣: OCX ҳӦ FALSE
}
@@ -82,7 +86,7 @@ DWORD CAudioDlg::WorkThread(LPVOID lParam)
{
if (!This->m_bSend)
{
- Sleep(50);
+ WAIT(This->m_bIsWorking, 1, 50);
continue;
}
DWORD dwBufferSize = 0;
@@ -101,12 +105,11 @@ void CAudioDlg::OnReceiveComplete(void)
m_nTotalRecvBytes += m_ContextObject->InDeCompressedBuffer.GetBufferLength() - 1; //1000+ =1000 1
CString strString;
strString.Format("Receive %d KBytes", m_nTotalRecvBytes / 1024);
- SetDlgItemText(IDC_TIP, strString);
+ SetDlgItemText(IDC_TIPS, strString);
switch (m_ContextObject->InDeCompressedBuffer.GetBuffer(0)[0])
{
case TOKEN_AUDIO_DATA:
{
-
m_AudioObject.PlayBuffer(m_ContextObject->InDeCompressedBuffer.GetBuffer(1),
m_ContextObject->InDeCompressedBuffer.GetBufferLength() - 1); //Ų
break;
@@ -134,3 +137,14 @@ void CAudioDlg::OnClose()
delete this;
#endif
}
+
+// ǷͱԶ
+void CAudioDlg::OnBnClickedCheck()
+{
+ // @notice 2019.1.26
+ // "ͱ"ض˱zlib inffas32.asm
+ // 轫ضzlibض±
+ // Ǽʹضڿ"ͱ"ʱױ
+ // ڲԶʱԭ
+ UpdateData(true);
+}
diff --git a/server/2015Remote/AudioDlg.h b/server/2015Remote/AudioDlg.h
index 54110d6..13e275c 100644
--- a/server/2015Remote/AudioDlg.h
+++ b/server/2015Remote/AudioDlg.h
@@ -33,7 +33,8 @@ protected:
DECLARE_MESSAGE_MAP()
public:
- BOOL m_bSend;
+ BOOL m_bSend; // ǷͱԶ
virtual BOOL OnInitDialog();
afx_msg void OnClose();
+ afx_msg void OnBnClickedCheck();
};
diff --git a/server/2015Remote/IOCPServer.cpp b/server/2015Remote/IOCPServer.cpp
index 771b7f0..f15cedc 100644
--- a/server/2015Remote/IOCPServer.cpp
+++ b/server/2015Remote/IOCPServer.cpp
@@ -332,6 +332,7 @@ DWORD IOCPServer::WorkThreadProc(LPVOID lParam)
if (ContextObject && This->m_bTimeToKill == FALSE &&dwTrans==0)
{
ContextObject->olps = NULL;
+ OutputDebugStringA("!!! RemoveStaleContext \n");
This->RemoveStaleContext(ContextObject);
}
SAFE_DELETE(OverlappedPlus);
@@ -539,7 +540,9 @@ VOID IOCPServer::OnClientPreSending(CONTEXT_OBJECT* ContextObject, PBYTE szBuffe
OVERLAPPEDPLUS* OverlappedPlus = new OVERLAPPEDPLUS(IOWrite);
BOOL bOk = PostQueuedCompletionStatus(m_hCompletionPort, 0, (DWORD)ContextObject, &OverlappedPlus->m_ol);
if ( (!bOk && GetLastError() != ERROR_IO_PENDING) ) //Ͷʧ
- {
+ {
+ int a = GetLastError();
+ OutputDebugStringA("!!! OnClientPreSending ͶϢʧ\n");
RemoveStaleContext(ContextObject);
SAFE_DELETE(OverlappedPlus);
}
@@ -569,6 +572,7 @@ BOOL IOCPServer::OnClientPostSending(CONTEXT_OBJECT* ContextObject,ULONG ulCompl
if ( iOk == SOCKET_ERROR && WSAGetLastError() != WSA_IO_PENDING )
{
int a = GetLastError();
+ OutputDebugStringA("!!! OnClientPostSending ͶϢʧ\n");
RemoveStaleContext(ContextObject);
SAFE_DELETE(OverlappedPlus);
}
@@ -686,6 +690,8 @@ void IOCPServer::OnAccept()
//ΪǽܵһûߵôǾͽǵɶ˿ ǵĹ̴߳
if ( (!bOk && GetLastError() != ERROR_IO_PENDING)) //Ͷʧ
{
+ int a = GetLastError();
+ OutputDebugStringA("!!! OnAccept ͶϢʧ\n");
RemoveStaleContext(ContextObject);
SAFE_DELETE(OverlappedPlus);
return;
@@ -710,6 +716,7 @@ VOID IOCPServer::PostRecv(CONTEXT_OBJECT* ContextObject)
if (iOk == SOCKET_ERROR && WSAGetLastError() != WSA_IO_PENDING)
{
int a = GetLastError();
+ OutputDebugStringA("!!! PostRecv ͶϢʧ\n");
RemoveStaleContext(ContextObject);
SAFE_DELETE(OverlappedPlus);
}
diff --git a/server/2015Remote/resource.h b/server/2015Remote/resource.h
index 7ddd7de..9a3e0ab 100644
Binary files a/server/2015Remote/resource.h and b/server/2015Remote/resource.h differ