This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sysctl patch. Was [ECOS] How to print IP routing table with eCOS ?


There is a bug in sysclt which means it does not updated the oldlen
value at the end of the call. This caused the example code to retrieve
the routing table to fail.

    Andrew

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.35
diff -u -r1.35 ChangeLog
--- ChangeLog   3 Nov 2003 14:57:33 -0000       1.35
+++ ChangeLog   8 Nov 2003 14:36:35 -0000
@@ -1,3 +1,8 @@
+2003-11-08  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+       * src/sys/kern/kern_sysctl.c (sysctl): Update the oldlen value at
+       the end of the sysctl call.
+
 2003-10-28  Matt Jerdonek  <maj1224@yahoo.com>
  
        * src/sys/netinet/tcp_output.c (tcp_setpersist): Use variable
Index: src/sys/kern/kern_sysctl.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c,v
retrieving revision 1.1
diff -u -r1.1 kern_sysctl.c
--- src/sys/kern/kern_sysctl.c  30 Jul 2003 07:42:32 -0000      1.1
+++ src/sys/kern/kern_sysctl.c  8 Nov 2003 14:36:37 -0000
@@ -979,6 +979,10 @@
           return -1;
         }
  
+        if (oldlenp) {
+          *oldlenp = req.oldidx;
+        }
+
         if (req.oldptr && req.oldidx > req.oldlen)
           retval = req.oldlen;
         else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]