projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b29c2f2
)
don't allow a job with id 0 (will be used for invalid job id)
author
Jonathan Marshall
<jmarshall@never.you.mind>
Thu, 3 Jan 2013 20:25:34 +0000
(09:25 +1300)
committer
S. Davilla
<davilla@4pi.com>
Sun, 6 Jan 2013 13:30:15 +0000
(08:30 -0500)
xbmc/utils/JobManager.cpp
patch
|
blob
|
history
diff --git
a/xbmc/utils/JobManager.cpp
b/xbmc/utils/JobManager.cpp
index
bebf80b
..
d3b3be1
100644
(file)
--- a/
xbmc/utils/JobManager.cpp
+++ b/
xbmc/utils/JobManager.cpp
@@
-203,8
+203,13
@@
unsigned int CJobManager::AddJob(CJob *job, IJobCallback *callback, CJob::PRIORI
{
CSingleLock lock(m_section);
+ // increment the job counter, ensuring 0 (invalid job) is never hit
+ m_jobCounter++;
+ if (m_jobCounter == 0)
+ m_jobCounter++;
+
// create a work item for this job
- CWorkItem work(job, m_jobCounter
++
, callback);
+ CWorkItem work(job, m_jobCounter, callback);
m_jobQueue[priority].push_back(work);
StartWorkers(priority);