OSDN Git Service
(root)
/
android-x86
/
external-alsa-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4b00dd
)
output error message instead of assert().
author
Takashi Iwai
<tiwai@suse.de>
Tue, 27 Aug 2002 16:30:59 +0000
(16:30 +0000)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 27 Aug 2002 16:30:59 +0000
(16:30 +0000)
assert() may cause an infinite loop in aplay, since it's in the
closing phase.
src/pcm/pcm_plug.c
patch
|
blob
|
history
diff --git
a/src/pcm/pcm_plug.c
b/src/pcm/pcm_plug.c
index
1553af7
..
efed660
100644
(file)
--- a/
src/pcm/pcm_plug.c
+++ b/
src/pcm/pcm_plug.c
@@
-65,7
+65,10
@@
static int snd_pcm_plug_close(snd_pcm_t *pcm)
int err, result = 0;
if (plug->ttable)
free(plug->ttable);
- assert(plug->slave == plug->req_slave);
+ if (plug->slave != plug->req_slave) {
+ SNDERR("plug slaves mismatch");
+ return -EINVAL;
+ }
if (plug->close_slave) {
err = snd_pcm_close(plug->req_slave);
if (err < 0)