Changeset 1764


Ignore:
Timestamp:
Jan 17, 2005, 2:56:43 AM (21 years ago)
Author:
bird
Message:

Fixed a couple of filehandle conversion bugs. Thanks to Froloff.

Location:
trunk/src/emx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/ChangeLog.LIBC

    • Property cvs2svn:cvs-rev changed from 1.8 to 1.9
    r1763 r1764  
    1010        o Implemented nl_langinfo(CODESET).
    1111        o Added bunch a of ASCII codeset name conversions.
     12    - libsocket:
     13        o os2_select: Fixed a couple of filehandle conversion bugs. Thanks to Froloff.
    1214
    13152004-12-20: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/src/emx/src/libsocket/os2_select.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r1763 r1764  
    44 * os2_select().
    55 *
    6  * Copyright (c) 2003 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2003-2005 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    3939int os2_select(int *s, int nreads, int nwrites, int nexcepts, long timeout)
    4040{
    41     LIBCLOG_ENTER("s=%p nreads=%d nwrites=%d nexcepts=%d timeout=%ld\n", s, nreads, nwrites, nexcepts, timeout);
     41    LIBCLOG_ENTER("s=%p nreads=%d nwrites=%d nexcepts=%d timeout=%ld\n", (void *)s, nreads, nwrites, nexcepts, timeout);
    4242    int     cSockets;
    4343    int    *aSockets;
     
    5050    cSockets = nreads + nwrites + nexcepts;
    5151    aSockets = alloca(cSockets * sizeof(int));
    52     if (aSockets)
     52    if (!aSockets)
    5353    {
    5454        __libc_TcpipSetErrno(ENOMEM);
     
    7171    rc = __libsocket_os2_select(aSockets, nreads, nwrites, nexcepts, timeout);
    7272    if (rc >= 0)
     73    {
     74        /*
     75         * Sync back the non-ready indicators (-1) to the passed in table.
     76         */
     77        for (i = 0; i < cSockets; i++)
     78            if (aSockets[i] == -1)
     79                s[i] = -1;
    7380        LIBCLOG_RETURN_INT(rc);
     81    }
    7482    __libc_TcpipUpdateErrno();
    7583    LIBCLOG_RETURN_INT(-1);
    7684}
    7785
    78 
    79 
Note: See TracChangeset for help on using the changeset viewer.