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

Fix race condition on channel GUID cache #452

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/pvr.argustv/addon/addon.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.argustv"
version="1.10.1"
version="1.10.2"
name="ARGUS TV client"
provider-name="Fred Hoogduin, Marcel Groothuis">
<requires>
Expand Down
2 changes: 2 additions & 0 deletions addons/pvr.argustv/addon/changelog.txt
@@ -1,3 +1,5 @@
v1.10.2 (22-03-2015)
- Fix race condition on Channel GUID cache
v1.10.1 (17-02-2015)
- Updated to PVR API v1.9.4
v1.9.189 (21-01-2015)
Expand Down
2 changes: 2 additions & 0 deletions addons/pvr.argustv/src/pvrclient-argustv.cpp
Expand Up @@ -418,6 +418,7 @@ int cPVRClientArgusTV::GetNumChannels()

PVR_ERROR cPVRClientArgusTV::GetChannels(ADDON_HANDLE handle, bool bRadio)
{
CLockObject lock(m_ChannelCacheMutex);
Json::Value response;
int retval = -1;

Expand Down Expand Up @@ -1123,6 +1124,7 @@ cChannel* cPVRClientArgusTV::FetchChannel(int channelid, bool LogError)

cChannel* cPVRClientArgusTV::FetchChannel(std::vector<cChannel*> m_Channels, int channelid, bool LogError)
{
CLockObject lock(m_ChannelCacheMutex);
// Search for this channel in our local channel list to find the original ChannelID back:
vector<cChannel*>::iterator it;

Expand Down
1 change: 1 addition & 0 deletions addons/pvr.argustv/src/pvrclient-argustv.h
Expand Up @@ -123,6 +123,7 @@ class cPVRClientArgusTV
time_t m_BackendUTCoffset;
time_t m_BackendTime;

PLATFORM::CMutex m_ChannelCacheMutex;
std::vector<cChannel*> m_TVChannels; // Local TV channel cache list needed for id to guid conversion
std::vector<cChannel*> m_RadioChannels; // Local Radio channel cache list needed for id to guid conversion
int m_epg_id_offset;
Expand Down