Changeset 2082fe29 in rtems


Ignore:
Timestamp:
Aug 3, 2001, 4:06:33 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
00815403
Parents:
ef5917de
Message:

2001-08-03 Joel Sherrill <joel@…>

  • libc/libio_sockets.c (rtems_bsdnet_fdToSocket): Per bug report from Gene Smith <Gene.Smith@…>, enhanced the error checking to account for a socket being closed.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/libio_sockets.c

    ref5917de r2082fe29  
    3232  rtems_libio_t *iop;
    3333
     34  /* same as rtems_libio_check_fd(_fd) but different return */
    3435  if ((unsigned32)fd >= rtems_libio_number_iops) {
    3536    errno = EBADF;
     
    3738  }
    3839  iop = &rtems_libio_iops[fd];
     40
     41  /* same as rtems_libio_check_is_open(iop) but different return */
     42  if ((iop->flags & LIBIO_FLAGS_OPEN) == 0) {
     43    errno = EBADF;
     44    return NULL;
     45  }
     46
    3947  if (iop->data1 == NULL)
    4048    errno = EBADF;
  • c/src/lib/ChangeLog

    ref5917de r2082fe29  
     12001-08-03      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libc/libio_sockets.c (rtems_bsdnet_fdToSocket): Per bug
     4        report from Gene Smith <Gene.Smith@sea.siemens.com>, enhanced the
     5        error checking to account for a socket being closed.
     6
    172001-05-25      Joel Sherrill <joel@OARcorp.com>
    28
  • c/src/lib/libc/libio_sockets.c

    ref5917de r2082fe29  
    3232  rtems_libio_t *iop;
    3333
     34  /* same as rtems_libio_check_fd(_fd) but different return */
    3435  if ((unsigned32)fd >= rtems_libio_number_iops) {
    3536    errno = EBADF;
     
    3738  }
    3839  iop = &rtems_libio_iops[fd];
     40
     41  /* same as rtems_libio_check_is_open(iop) but different return */
     42  if ((iop->flags & LIBIO_FLAGS_OPEN) == 0) {
     43    errno = EBADF;
     44    return NULL;
     45  }
     46
    3947  if (iop->data1 == NULL)
    4048    errno = EBADF;
  • cpukit/libcsupport/src/libio_sockets.c

    ref5917de r2082fe29  
    3232  rtems_libio_t *iop;
    3333
     34  /* same as rtems_libio_check_fd(_fd) but different return */
    3435  if ((unsigned32)fd >= rtems_libio_number_iops) {
    3536    errno = EBADF;
     
    3738  }
    3839  iop = &rtems_libio_iops[fd];
     40
     41  /* same as rtems_libio_check_is_open(iop) but different return */
     42  if ((iop->flags & LIBIO_FLAGS_OPEN) == 0) {
     43    errno = EBADF;
     44    return NULL;
     45  }
     46
    3947  if (iop->data1 == NULL)
    4048    errno = EBADF;
Note: See TracChangeset for help on using the changeset viewer.