chiark / gitweb /
do not lputs pings
authorian <ian>
Mon, 14 Jul 2008 21:04:36 +0000 (21:04 +0000)
committerian <ian>
Mon, 14 Jul 2008 21:04:36 +0000 (21:04 +0000)
hostside/multiplex

index c062cbac6a8af22e131803774e3fb18c039ee482..04b9afb4cbb496c61af19c4596e45d72b2435618 100755 (executable)
@@ -83,6 +83,14 @@ proc nargs {l {n 0}} {
 
 proc cmderr {ecode emsg} { error $emsg "" [list TRAIN CMDERR $ecode] }
 
+proc lputs {m} {
+    if {[regexp \
+ {^\<[<&] picioh (?:in msg|out) 8[09a-f]|^\<[<&] picio (?:in pong|out ping)} \
+            $m]} \
+       return
+    puts $m
+}
+
 proc xmit-relevantly {m} {
     global executing currentconn conns
     if {$executing} {
@@ -93,7 +101,7 @@ proc xmit-relevantly {m} {
        }
        set othersm -$m
     } else {
-       puts "<& $m"
+       lputs "<& $m"
        set myconn {}
        set othersm &$m
     }
@@ -660,7 +668,7 @@ proc realtime-inputline {dummy l} {
        return
     }
 
-    puts "<< $l"
+    lputs "<< $l"
 
     if {[regexp {^(detect (\w+)) ([01])$} $l dummy key seg value]} {
        upvar #0 detect0($seg) d0