diff --git a/addons/pvr.tvh/src/Tvheadend.cpp b/addons/pvr.tvh/src/Tvheadend.cpp index 805fafc..0c72485 100644 --- a/addons/pvr.tvh/src/Tvheadend.cpp +++ b/addons/pvr.tvh/src/Tvheadend.cpp @@ -40,7 +40,8 @@ using namespace ADDON; using namespace PLATFORM; CTvheadend::CTvheadend() - : m_dmx(m_conn), m_vfs(m_conn), m_queue((size_t) - 1), m_asyncState(ASYNC_NONE), + : m_dmx(m_conn), m_vfs(m_conn), m_queue((size_t)-1), + m_asyncState(ASYNC_NONE), m_asyncComplete(false) { } @@ -193,6 +194,9 @@ PVR_ERROR CTvheadend::GetChannels ( ADDON_HANDLE handle, bool radio ) strncpy(chn.strIconPath, it->second.icon.c_str(), sizeof(chn.strIconPath) - 1); + tvhdebug("passing channel %d to XBMC (name=%s, number=%d)", + chn.iUniqueId, chn.strChannelName, chn.iChannelNumber); + PVR->TransferChannelEntry(handle, &chn); } @@ -728,7 +732,10 @@ bool CTvheadend::ProcessMessage ( const char *method, htsmsg_t *msg ) return true; /* Store */ - m_queue.Push(CHTSPMessage(method, msg)); + if (m_queue.Push(CHTSPMessage(method, msg))) + tvhtrace("stored message [%s]", method); + else + tvherror("failed to store message [%s]", method); return false; } @@ -1099,7 +1106,6 @@ void CTvheadend::ParseChannelUpdate ( htsmsg_t *msg ) UPDATE(channel.caid, caid); } - /* Update XBMC */ if (update) { tvhdebug("channel update id:%u, name:%s", @@ -1129,9 +1135,9 @@ void CTvheadend::ParseChannelDelete ( htsmsg_t *msg ) void CTvheadend::ParseRecordingUpdate ( htsmsg_t *msg ) { bool update = false; - const char *state, *str; - uint32_t id, channel; - int64_t start, stop; + const char *state = NULL, *str; + uint32_t id = 0, channel = 0; + int64_t start = 0, stop = 0; /* Channels must be complete */ SyncChannelsCompleted(); @@ -1143,7 +1149,8 @@ void CTvheadend::ParseRecordingUpdate ( htsmsg_t *msg ) htsmsg_get_s64(msg, "stop", &stop) || ((state = htsmsg_get_str(msg, "state")) == NULL)) { - tvherror("malformed dvrEntryUpdate"); + tvherror("malformed dvrEntryUpdate (%d, %d, %lld, %lld, %s)", + id, channel, (long long)start, (long long)stop, state); return; }