[pulseaudio-commits] r1421 - /trunk/src/utils/padsp.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jan 4 06:20:54 PST 2007


Author: ossman
Date: Thu Jan  4 15:20:53 2007
New Revision: 1421

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1421&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Report IO error on ioctl() when we're in a fatal error state.

Modified:
    trunk/src/utils/padsp.c

Modified: trunk/src/utils/padsp.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/utils/padsp.c?rev=3D1=
421&root=3Dpulseaudio&r1=3D1420&r2=3D1421&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/utils/padsp.c (original)
+++ trunk/src/utils/padsp.c Thu Jan  4 15:20:53 2007
@@ -1800,6 +1800,16 @@
 static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_e=
rrno) {
     int ret =3D -1;
 =

+    if (i->thread_fd =3D=3D -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 er=
ror state\n", request);
+        *_errno =3D EIO;
+        return -1;
+    }
+
     switch (request) {
         case SNDCTL_DSP_SETFMT: {
             debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_SETFMT: %i\n",=
 *(int*) argp);




More information about the pulseaudio-commits mailing list