Permalink
Browse files

vnsi add-on: drop method abort, calling shutdown on a protected socke…

…t makes no sense
  • Loading branch information...
1 parent a76e88f commit 3dc0749c9eb65b305056cd97c8d3c8bb7b7dbbbf @FernetMenta FernetMenta committed with Lars Op den Kamp Jun 6, 2012
@@ -29,21 +29,17 @@ using namespace ADDON;
using namespace PLATFORM;
cVNSIData::cVNSIData()
- : m_aborting(false)
{
}
cVNSIData::~cVNSIData()
{
- Abort();
StopThread();
Close();
}
bool cVNSIData::Open(const std::string& hostname, int port, const char* name)
{
- m_aborting = false;
-
if(!cVNSISession::Open(hostname, port, name))
return false;
@@ -59,23 +55,6 @@ bool cVNSIData::Login()
return true;
}
-void cVNSIData::Abort()
-{
- CLockObject lock(m_mutex);
- m_aborting = true;
- cVNSISession::Abort();
-}
-
-void cVNSIData::SignalConnectionLost()
-{
- CLockObject lock(m_mutex);
-
- if(m_aborting)
- return;
-
- cVNSISession::SignalConnectionLost();
-}
-
void cVNSIData::OnDisconnect()
{
XBMC->QueueNotification(QUEUE_ERROR, XBMC->GetLocalizedString(30044));
@@ -38,7 +38,6 @@ class cVNSIData : public cVNSISession, public PLATFORM::CThread
bool Open(const std::string& hostname, int port, const char* name = NULL);
bool Login();
- void Abort();
bool SupportChannelScan();
bool EnableStatusInterface(bool onOff);
@@ -72,7 +71,6 @@ class cVNSIData : public cVNSISession, public PLATFORM::CThread
virtual void *Process(void);
virtual bool OnResponsePacket(cResponsePacket *pkt);
- void SignalConnectionLost();
void OnDisconnect();
void OnReconnect();
@@ -89,6 +87,5 @@ class cVNSIData : public cVNSISession, public PLATFORM::CThread
SMessages m_queue;
std::string m_videodir;
- bool m_aborting;
PLATFORM::CMutex m_mutex;
};
@@ -74,7 +74,6 @@ bool cVNSIDemux::GetStreamProperties(PVR_STREAM_PROPERTIES* props)
void cVNSIDemux::Abort()
{
m_Streams.iStreamCount = 0;
- cVNSISession::Abort();
}
DemuxPacket* cVNSIDemux::Read()
@@ -55,14 +55,6 @@ cVNSISession::~cVNSISession()
Close();
}
-void cVNSISession::Abort()
-{
- if (!m_socket)
- return;
-
- m_socket->Shutdown();
-}
-
void cVNSISession::Close()
{
if(IsOpen())
@@ -348,7 +340,6 @@ void cVNSISession::SignalConnectionLost()
XBMC->Log(LOG_ERROR, "%s - connection lost !!!", __FUNCTION__);
m_connectionLost = true;
- Abort();
Close();
OnDisconnect();
@@ -42,7 +42,6 @@ class cVNSISession
virtual bool Open(const std::string& hostname, int port, const char *name = NULL);
virtual bool Login();
virtual void Close();
- virtual void Abort();
cResponsePacket* ReadMessage(int iInitialTimeout = 10000, int iDatapacketTimeout = 10000);
bool TransmitMessage(cRequestPacket* vrp);

0 comments on commit 3dc0749

Please sign in to comment.