Ticket #5341: GetNextLiveTVDir_tryLock.diff
File GetNextLiveTVDir_tryLock.diff, 1019 bytes (added by , 15 years ago) |
---|
-
mythtv/programs/mythbackend/scheduler.cpp
static bool comp_dirpreference(FileSystemInfo *a, FileSystemInfo *b) 3679 3679 3680 3680 void Scheduler::GetNextLiveTVDir(int cardid) 3681 3681 { 3682 QMutexLocker lockit(reclist_lock); 3682 int lock_attempts = 0; 3683 3684 while (lock_attempts++ < 5 && !reclist_lock->tryLock()) 3685 { 3686 VERBOSE(VB_IMPORTANT, LOC + "FindNextLiveTVDir: tryLock failed: "<<lock_attempts); 3687 usleep(5000); 3688 } 3689 3690 if (lock_attempts >= 5) 3691 return; 3683 3692 3684 3693 ProgramInfo *pginfo = new ProgramInfo; 3685 3694 … … void Scheduler::GetNextLiveTVDir(int cardid) 3701 3710 3702 3711 int fsID = FillRecordingDir(pginfo, reclist); 3703 3712 3713 reclist_lock->unlock(); 3714 3704 3715 tv->SetNextLiveTVDir(pginfo->pathname); 3705 3716 3706 3717 VERBOSE(VB_RECORD, LOC + QString("FindNextLiveTVDir: next dir is '%1'")