Skip to content

Commit

Permalink
Refs #10311. Port zoneminder use for MythSocket to ReferenceCounter.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Jun 14, 2012
1 parent f2a0d74 commit 426de1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mythplugins/mythzoneminder/mythzoneminder/zmclient.cpp
Expand Up @@ -91,15 +91,15 @@ bool ZMClient::connectToHost(const QString &lhostname, unsigned int lport)
.arg(m_hostname).arg(m_port).arg(count));
if (m_socket)
{
m_socket->DownRef();
m_socket->DecrRef();
m_socket = NULL;
}

m_socket = new MythSocket();
//m_socket->setCallbacks(this);
if (!m_socket->connect(m_hostname, m_port))
{
m_socket->DownRef();
m_socket->DecrRef();
m_socket = NULL;
}
else
Expand Down Expand Up @@ -243,7 +243,8 @@ ZMClient::~ZMClient()

if (m_socket)
{
m_socket->DownRef();
m_socket->DecrRef();
m_socket = NULL;
m_zmclientReady = false;
}

Expand Down

0 comments on commit 426de1b

Please sign in to comment.