mirror of https://github.com/ShaYmez/xlxd.git
parent
640f7c5c9c
commit
f643fc512a
|
@ -71,18 +71,20 @@ CStream::CStream(uint16 uiId, const CCallsign &Callsign, const CIp &Ip, uint8 ui
|
|||
|
||||
CStream::~CStream()
|
||||
{
|
||||
m_Socket.Close();
|
||||
if ( m_VocodecChannel != NULL )
|
||||
{
|
||||
g_Vocodecs.CloseChannel(m_VocodecChannel);
|
||||
m_VocodecChannel = NULL;
|
||||
}
|
||||
|
||||
// stop thread first
|
||||
m_bStopThread = true;
|
||||
if ( m_pThread != NULL )
|
||||
{
|
||||
m_pThread->join();
|
||||
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)
|
||||
{
|
||||
// close everything
|
||||
m_Socket.Close();
|
||||
if ( m_VocodecChannel != NULL )
|
||||
{
|
||||
m_VocodecChannel->Close();
|
||||
}
|
||||
|
||||
// stop thread first
|
||||
m_bStopThread = true;
|
||||
if ( m_pThread != NULL )
|
||||
{
|
||||
|
@ -148,6 +144,14 @@ void CStream::Close(void)
|
|||
delete m_pThread;
|
||||
m_pThread = NULL;
|
||||
}
|
||||
|
||||
// then close everything
|
||||
m_Socket.Close();
|
||||
if ( m_VocodecChannel != NULL )
|
||||
{
|
||||
m_VocodecChannel->Close();
|
||||
}
|
||||
|
||||
|
||||
// report
|
||||
std::cout << m_iLostPackets << " of " << m_iTotalPackets << " packets lost" << std::endl;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_REVISION 2
|
||||
#define VERSION_REVISION 3
|
||||
|
||||
// global ------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue