[tkined] Fix for dumping core at [ Tnm::icmp -timeout 40 ]

From: Jun Kuriyama (kuriyama@imgsrc.co.jp)
Date: Thu Aug 10 2000 - 05:58:36 MET DST


Hi. I'm trying to modify scotty to work with ICMPv6. (But it seems
little difficult for me, so more time is needed...)

I found "make check" failed at icmp-3.0 in my environment
(FreeBSD-current, tcl/tk 8.3.1, cvs checkout'ed scotty). I think this
patch is required (or some "x++"s move to inside of "for" directive
paren).

Index: tnmIcmp.c
===================================================================
RCS file: /anoncvs/scotty/tnm/generic/tnmIcmp.c,v
retrieving revision 1.5
diff -u -r1.5 tnmIcmp.c
--- tnmIcmp.c 1999/10/06 09:07:04 1.5
+++ tnmIcmp.c 2000/08/10 03:51:42
@@ -237,7 +237,7 @@
     int type = 0; /* the request type */
     int ttl = -1; /* the time to live field */
     int flags = 0; /* the flags for this request */
- int x = 1, code;
+ int x, code;
 
     enum commands {
         cmdEcho, cmdMask, cmdTimestamp, cmdTrace, cmdTtl
@@ -273,7 +273,7 @@
      * Parse the options.
      */
 
- while (1) {
+ for (x = 1; x < objc;) {
         code = TnmGetTableKeyFromObj(interp, icmpOptionTable,
                                      objv[x], "option");
         if (code == -1) {

-- 
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama@FreeBSD.org> // FreeBSD Project
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.



This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:51 MET