Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Modules/ossaudiodev.c

    r2 r391  
    1717 * XXX need a license statement
    1818 *
    19  * $Id: ossaudiodev.c 64048 2008-06-09 04:58:54Z gregory.p.smith $
     19 * $Id$
    2020 */
    2121
     
    130130
    131131    if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
     132        close(fd);
    132133        PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
    133134        return NULL;
     
    215216
    216217/* _do_ioctl_1() is a private helper function used for the OSS ioctls --
    217    SNDCTL_DSP_{SETFMT,CHANNELS,SPEED} -- that that are called from C
     218   SNDCTL_DSP_{SETFMT,CHANNELS,SPEED} -- that are called from C
    218219   like this:
    219220     ioctl(fd, SNDCTL_DSP_cmd, &arg)
     
    426427        return NULL;
    427428
     429    if (!_PyIsSelectable_fd(self->fd)) {
     430        PyErr_SetString(PyExc_ValueError,
     431                        "file descriptor out of range for select");
     432        return NULL;
     433    }
    428434    /* use select to wait for audio device to be available */
    429435    FD_ZERO(&write_set_fds);
Note: See TracChangeset for help on using the changeset viewer.