Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
[cppmyth] check other services in wsapi init
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Sep 7, 2015
1 parent 6152c8c commit 212f8a1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/cppmyth/src/mythwsapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,20 @@ bool WSAPI::InitWSAPI()
else if (mythwsv.ranking >= 0x00020000)
status = CheckServerHostName2_0() & CheckVersion2_0();

// If everything is fine then check other services
if (status)
{
GetServiceVersion(WS_Capture, m_serviceVersion[WS_Capture]);
GetServiceVersion(WS_Channel, m_serviceVersion[WS_Channel]);
GetServiceVersion(WS_Guide, m_serviceVersion[WS_Guide]);
GetServiceVersion(WS_Content, m_serviceVersion[WS_Content]);
GetServiceVersion(WS_Dvr, m_serviceVersion[WS_Dvr]);
DBG(MYTH_DBG_INFO, "%s: MythTV API service is available: %s:%d(%s) protocol(%d) schema(%d)\n",
__FUNCTION__, m_serverHostName.c_str(), m_port, m_version.version.c_str(),
(unsigned)m_version.protocol, (unsigned)m_version.schema);
return true;
if (GetServiceVersion(WS_Capture, m_serviceVersion[WS_Capture]) &&
GetServiceVersion(WS_Channel, m_serviceVersion[WS_Channel]) &&
GetServiceVersion(WS_Guide, m_serviceVersion[WS_Guide]) &&
GetServiceVersion(WS_Content, m_serviceVersion[WS_Content]) &&
GetServiceVersion(WS_Dvr, m_serviceVersion[WS_Dvr]))
{
DBG(MYTH_DBG_INFO, "%s: MythTV API service is available: %s:%d(%s) protocol(%d) schema(%d)\n",
__FUNCTION__, m_serverHostName.c_str(), m_port, m_version.version.c_str(),
(unsigned)m_version.protocol, (unsigned)m_version.schema);
return true;
}
}
DBG(MYTH_DBG_ERROR, "%s: MythTV API service is not supported or unavailable: %s:%d (%u.%u)\n",
__FUNCTION__, m_server.c_str(), m_port, mythwsv.major, mythwsv.minor);
Expand Down

0 comments on commit 212f8a1

Please sign in to comment.