[noctool-cvs] CVS source
jprewett
jprewett at common-lisp.net
Fri May 16 20:26:09 UTC 2008
Update of /project/noctool/cvsroot/source
In directory clnet:/tmp/cvs-serv8384
Modified Files:
utils.lisp
Log Message:
kludgy solution to make make-ping deal with pings that index from 0 or pings that index from 1. NOTE that this kludge doesn't deal with pings that index from 0 that drop the first packet.
--- /project/noctool/cvsroot/source/utils.lisp 2008/05/16 20:20:49 1.4
+++ /project/noctool/cvsroot/source/utils.lisp 2008/05/16 20:26:08 1.5
@@ -88,13 +88,14 @@
(with-pty (run-command args)
(loop for line = (read-pty-line pty nil)
for n below (+ 4 count)
+ with shift = 1
do (when (and line (<= 1 n count))
(let ((seq (ping-helper "icmp_seq" line))
(rtt (ping-helper "time" line)))
(when (and seq rtt)
- (format t "seq: ~A rtt: ~A~%" seq rtt)
- ;; this seems to be a bug?!
- (setf (aref rv (1- seq)) rtt))))))
+ (when (eql 0 seq)
+ (setf shift 0))
+ (setf (aref rv (- seq shift)) rtt))))))
rv))
(defun decay-alert (old new)
More information about the noctool-cvs
mailing list