Skip to content
Browse files

[pvr] fixed prevent deadlock when pvr manager is starting up and whil…

…e not finished change to settings. this is more a workaround and should be revisited after frodo.
  • Loading branch information...
1 parent 14689e2 commit ee11f6f8ecb74ddfd559f10cc29574797e8bda4a @huceke committed Dec 26, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 xbmc/pvr/channels/PVRChannelGroup.cpp
View
8 xbmc/pvr/channels/PVRChannelGroup.cpp
@@ -962,7 +962,12 @@ void CPVRChannelGroup::ResetChannelNumbers(void)
void CPVRChannelGroup::Notify(const Observable &obs, const ObservableMessage msg)
{
- if (msg == ObservableMessageGuiSettings)
+ /* TODO: while pvr manager is starting up do accept setting changes. */
+ if(!g_PVRManager.IsStarted())
+ {
+ CLog::Log(LOGWARNING, "CPVRChannelGroup setting change ignored while PVRManager is starting\n");
+ }
+ else if (msg == ObservableMessageGuiSettings)
{
CSingleLock lock(m_critSection);
bool bUsingBackendChannelOrder = g_guiSettings.GetBool("pvrmanager.backendchannelorder");
@@ -972,6 +977,7 @@ void CPVRChannelGroup::Notify(const Observable &obs, const ObservableMessage msg
m_bUsingBackendChannelOrder = bUsingBackendChannelOrder;
m_bUsingBackendChannelNumbers = bUsingBackendChannelNumbers;
+ lock.Leave();
/* check whether this channel group has to be renumbered */
if (bChannelOrderChanged || bChannelNumbersChanged)

0 comments on commit ee11f6f

Please sign in to comment.
Something went wrong with that request. Please try again.