mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Report IO error on ioctl() when we're in a fatal error state.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1421 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
c992ed9c47
commit
4c0a481f79
1 changed files with 10 additions and 0 deletions
|
|
@ -1800,6 +1800,16 @@ fail:
|
|||
static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno) {
|
||||
int ret = -1;
|
||||
|
||||
if (i->thread_fd == -1) {
|
||||
/*
|
||||
* We've encountered some fatal error and are just waiting
|
||||
* for a close.
|
||||
*/
|
||||
debug(DEBUG_LEVEL_NORMAL, __FILE__": got ioctl 0x%08lx in fatal error state\n", request);
|
||||
*_errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (request) {
|
||||
case SNDCTL_DSP_SETFMT: {
|
||||
debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_SETFMT: %i\n", *(int*) argp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue