Permalink
Browse files

Fix assumption that ints would be initialised to zero in JobQueueEntr…

…y, this isn't the case with C++. It appears that this would have caused any job that didn't include a chanid to abort even though the code indicates that it's perfectly valid to have a job which doesn't operate on a recording and wouldn't require the chanid. I don't know enough about the intended behaviour to say whether this will fix a user-visible bug ... Discovered by Coverity.
  • Loading branch information...
1 parent fae8d9f commit 02f546356385dfbc6c72191080b3f3fa6d8b3311 @stuartm stuartm committed May 18, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 mythtv/libs/libmythtv/jobqueue.cpp
@@ -1308,6 +1308,7 @@ int JobQueue::GetJobsInQueue(QMap<int, JobQueueEntry> &jobs, int findJobs)
// -1 indicates the chanid is empty
if (query.value(1).toInt() == -1)
{
+ thisJob.chanid = 0;
logInfo = QString("jobID #%1").arg(thisJob.id);
}
else

0 comments on commit 02f5463

Please sign in to comment.