projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae278c4
)
Coverity: Missing lock: CID 584
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 13 Jan 2012 22:43:25 +0000
(17:43 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 13 Jan 2012 22:43:25 +0000
(17:43 -0500)
* src/media/sound-esd.c (sound_esd_play): Surround play_state
change with the necessary lock.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/media/sound-esd.c
patch
|
blob
|
history
diff --git
a/src/media/sound-esd.c
b/src/media/sound-esd.c
index
110f5af
..
262b351
100644
(file)
--- a/
src/media/sound-esd.c
+++ b/
src/media/sound-esd.c
@@
-373,6
+373,7
@@
sound_esd_play(audio_job_t aj)
mss, aj->buffer, resolution);
if (!len) {
ESD_DEBUG_S("finished\n");
+ SXE_MUTEX_LOCK(&aj->mtx);
aj->play_state = MTPSTATE_STOP;
break;
}
@@
-405,7
+406,9
@@
sound_esd_play(audio_job_t aj)
if (wrtn < 0) {
ESD_DEBUG_S("writing to socket failed: %d.\n",
wrtn);
+ SXE_MUTEX_LOCK(&aj->mtx);
aj->play_state = MTPSTATE_STOP;
+ SXE_MUTEX_UNLOCK(&aj->mtx);
}
break;
case MTPSTATE_PAUSE: