summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-02-11 22:58:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-02-11 22:58:08 +0000
commit83e36d6bb77038d01d07bdf62a3037a01284bfdb (patch)
tree690dbc3ebc087fad82af7777b5f355eabb1e4343 /cpukit
parent2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-83e36d6bb77038d01d07bdf62a3037a01284bfdb.tar.bz2
2003-02-11 Mike Siers <mikes@poliac.com>
* rtems/rtems_glue.c: A small patch to the network daemon task code. I just added code to check the return value of the rtems_bsdnet_event_receive function. Only when this function returns a SUCCESSFUL status, will the event flags be checked. This is more of a code cleanup issue than a bug. The patch will just ensure the ipintr() and arpintr() functions are only called when a event is signaled.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libnetworking/ChangeLog10
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c15
2 files changed, 20 insertions, 5 deletions
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog
index f875c98380..fdd7e2f2ff 100644
--- a/cpukit/libnetworking/ChangeLog
+++ b/cpukit/libnetworking/ChangeLog
@@ -1,3 +1,13 @@
+2003-02-11 Mike Siers <mikes@poliac.com>
+
+ * rtems/rtems_glue.c: A small patch to the network daemon task
+ code. I just added code to check the return value of
+ the rtems_bsdnet_event_receive function. Only when
+ this function returns a SUCCESSFUL status, will the
+ event flags be checked. This is more of a code cleanup issue
+ than a bug. The patch will just ensure the ipintr() and
+ arpintr() functions are only called when a event is signaled.
+
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index cf3b0925c8..4ed1455cff 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -503,6 +503,7 @@ rtems_bsdnet_schednetisr (int n)
static void
networkDaemon (void *task_argument)
{
+ rtems_status_code sc;
rtems_event_set events;
rtems_interval now;
int ticksPassed;
@@ -515,14 +516,18 @@ networkDaemon (void *task_argument)
timeout = c->c_time;
else
timeout = RTEMS_NO_TIMEOUT;
- rtems_bsdnet_event_receive (NETISR_EVENTS,
+
+ sc = rtems_bsdnet_event_receive (NETISR_EVENTS,
RTEMS_EVENT_ANY | RTEMS_WAIT,
timeout,
&events);
- if (events & NETISR_IP_EVENT)
- ipintr ();
- if (events & NETISR_ARP_EVENT)
- arpintr ();
+ if ( sc == RTEMS_SUCCESSFUL ) {
+ if (events & NETISR_IP_EVENT)
+ ipintr ();
+ if (events & NETISR_ARP_EVENT)
+ arpintr ();
+ }
+
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
ticksPassed = now - ticksWhenCalloutsLastChecked;
if (ticksPassed != 0) {