Changeset da56a02 in rtems


Ignore:
Timestamp:
May 20, 2005, 7:31:18 PM (15 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
7918027
Parents:
c230bc3
Message:

2005-05-20 Sergei Organov <osv@…>

PR 750/networking

  • pppd/sys-rtems.c: Avoid NULL dereference in wait_input().
Location:
c/src/libnetworking
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/libnetworking/ChangeLog

    rc230bc3 rda56a02  
     12005-05-20      Sergei Organov  <osv@topconrd.ru>
     2
     3        PR 750/networking
     4        * pppd/sys-rtems.c: Avoid NULL dereference in wait_input().
     5
    162004-04-03      Wilfried Busalski <w.busalski@lancier-monitoring.de>
    27
  • c/src/libnetworking/pppd/sys-rtems.c

    rc230bc3 rda56a02  
    514514    struct timeval *timo;
    515515{
    516   rtems_interval     ticks;
    517516  rtems_event_set    events;
    518 
    519   ticks = ((timo->tv_sec*1000000)+timo->tv_usec)/rtems_bsdnet_microseconds_per_tick;
    520   if ( ticks > 0 ) {
    521     rtems_event_receive(RTEMS_EVENT_31, (RTEMS_EVENT_ANY|RTEMS_WAIT), ticks, &events);
     517  rtems_interval     ticks = 0;
     518  rtems_option       wait = RTEMS_WAIT;
     519
     520  if(timo) {
     521    if(timo->tv_sec == 0 && timo->tv_usec == 0)
     522      wait = RTEMS_NO_WAIT;
     523    else {
     524      ticks = (timo->tv_sec * 1000000 + timo->tv_usec) /
     525        rtems_bsdnet_microseconds_per_tick;
     526      if(ticks <= 0)
     527        ticks = 1;
     528    }
    522529  }
     530  rtems_event_receive(RTEMS_EVENT_31, RTEMS_EVENT_ANY | wait, ticks, &events);
    523531}
    524532
Note: See TracChangeset for help on using the changeset viewer.