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

Commit

Permalink
pvr: don't lock while deleting a recording and only update the list a…
Browse files Browse the repository at this point in the history
…fter recording once. fixes possible deadlock when deleting a recording
  • Loading branch information
opdenkamp committed Apr 17, 2011
1 parent 64874d6 commit 9033a90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions xbmc/pvr/recordings/PVRRecordings.cpp
Expand Up @@ -227,8 +227,6 @@ bool CPVRRecordings::DeleteRecording(const CFileItem &item)
}

CPVRRecording *tag = (CPVRRecording *)item.GetPVRRecordingInfoTag();
CSingleLock lock(m_critSection);

return tag->Delete();
}

Expand Down
7 changes: 2 additions & 5 deletions xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
Expand Up @@ -175,7 +175,7 @@ bool CGUIWindowPVRRecordings::OnContextButtonDelete(CFileItem *item, CONTEXT_BUT

if (button == CONTEXT_BUTTON_DELETE)
{
bReturn = true;
bReturn = false;

CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
Expand All @@ -189,10 +189,7 @@ bool CGUIWindowPVRRecordings::OnContextButtonDelete(CFileItem *item, CONTEXT_BUT
if (!pDialog->IsConfirmed())
return bReturn;

if (g_PVRRecordings->DeleteRecording(*item))
{
g_PVRManager.TriggerRecordingsUpdate();
}
bReturn = g_PVRRecordings->DeleteRecording(*item);
}

return bReturn;
Expand Down

0 comments on commit 9033a90

Please sign in to comment.