mirror of
https://github.com/ShaYmez/xlxd.git
synced 2025-09-04 06:07:53 -04:00
ambed 1.3.3
Corrected bug crashing ambed
This commit is contained in:
parent
640f7c5c9c
commit
f643fc512a
32
ambed/cstream.cpp
Normal file → Executable file
32
ambed/cstream.cpp
Normal file → Executable file
@ -71,18 +71,20 @@ CStream::CStream(uint16 uiId, const CCallsign &Callsign, const CIp &Ip, uint8 ui
|
|||||||
|
|
||||||
CStream::~CStream()
|
CStream::~CStream()
|
||||||
{
|
{
|
||||||
m_Socket.Close();
|
// stop thread first
|
||||||
if ( m_VocodecChannel != NULL )
|
|
||||||
{
|
|
||||||
g_Vocodecs.CloseChannel(m_VocodecChannel);
|
|
||||||
m_VocodecChannel = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bStopThread = true;
|
m_bStopThread = true;
|
||||||
if ( m_pThread != NULL )
|
if ( m_pThread != NULL )
|
||||||
{
|
{
|
||||||
m_pThread->join();
|
m_pThread->join();
|
||||||
delete m_pThread;
|
delete m_pThread;
|
||||||
|
m_pThread = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// then close everything
|
||||||
|
m_Socket.Close();
|
||||||
|
if ( m_VocodecChannel != NULL )
|
||||||
|
{
|
||||||
|
m_VocodecChannel->Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,13 +136,7 @@ bool CStream::Init(uint16 uiPort)
|
|||||||
|
|
||||||
void CStream::Close(void)
|
void CStream::Close(void)
|
||||||
{
|
{
|
||||||
// close everything
|
// stop thread first
|
||||||
m_Socket.Close();
|
|
||||||
if ( m_VocodecChannel != NULL )
|
|
||||||
{
|
|
||||||
m_VocodecChannel->Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bStopThread = true;
|
m_bStopThread = true;
|
||||||
if ( m_pThread != NULL )
|
if ( m_pThread != NULL )
|
||||||
{
|
{
|
||||||
@ -148,6 +144,14 @@ void CStream::Close(void)
|
|||||||
delete m_pThread;
|
delete m_pThread;
|
||||||
m_pThread = NULL;
|
m_pThread = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// then close everything
|
||||||
|
m_Socket.Close();
|
||||||
|
if ( m_VocodecChannel != NULL )
|
||||||
|
{
|
||||||
|
m_VocodecChannel->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// report
|
// report
|
||||||
std::cout << m_iLostPackets << " of " << m_iTotalPackets << " packets lost" << std::endl;
|
std::cout << m_iLostPackets << " of " << m_iTotalPackets << " packets lost" << std::endl;
|
||||||
|
2
ambed/main.h
Normal file → Executable file
2
ambed/main.h
Normal file → Executable file
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 2
|
#define VERSION_REVISION 3
|
||||||
|
|
||||||
// global ------------------------------------------------------
|
// global ------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user