xschem tcp connections: print in/out data on console only if in tcl debug mode

This commit is contained in:
stefan schippers 2023-09-10 08:00:26 +02:00
parent 045edb5e10
commit 4bd758bee7
1 changed files with 2 additions and 2 deletions

View File

@ -1272,13 +1272,13 @@ proc xschem_getdata {sock} {
append xschem_server_getdata(line,$sock) $line \n
}
}
puts "tcp<-- $xschem_server_getdata(line,$sock)"
if {$debug_var<=-1} {puts "tcp<-- $xschem_server_getdata(line,$sock)"}
# xschem command must be executed at global scope...
redef_puts
uplevel #0 [list catch $xschem_server_getdata(line,$sock) tclcmd_puts]
rename puts {}
rename ::tcl::puts puts
puts "tcp--> $tclcmd_puts"
if {$debug_var<=-1} {puts "tcp--> $tclcmd_puts"}
set xschem_server_getdata(res,$sock) "$tclcmd_puts"
puts -nonewline $sock "$xschem_server_getdata(res,$sock)"
flush $sock