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

Commit

Permalink
Merge pull request #453 from Red-F/cachelock_helix
Browse files Browse the repository at this point in the history
Fix race condition on channel GUID cache
  • Loading branch information
Lars Op den Kamp committed Apr 6, 2015
2 parents 4854fbe + 5f9db70 commit c2f8ea7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
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.9.186"
version="1.9.187"
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.9.187 (22-03-2015)
- Fix race condition on Channel GUID cache
v1.9.186 (15-02-2015)
- platform fixes
v1.9.185 (02-12-2014)
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

0 comments on commit c2f8ea7

Please sign in to comment.