diff options
author | runge <runge@karlrunge.com> | 2010-05-05 11:56:36 -0400 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2010-05-05 11:56:36 -0400 |
commit | 21fd3a45b9095ac7dc19cf0dc2cdea4eeafa1776 (patch) | |
tree | 0f59f2f7268a8b456e46785904b536a493cf4296 /x11vnc/misc/enhanced_tightvnc_viewer/Windows/util | |
parent | a8ae0625c6e09731617b4b12ce648b494f6bd3c7 (diff) | |
download | libtdevnc-21fd3a45b9095ac7dc19cf0dc2cdea4eeafa1776.tar.gz libtdevnc-21fd3a45b9095ac7dc19cf0dc2cdea4eeafa1776.zip |
misc/etv sync.
Diffstat (limited to 'x11vnc/misc/enhanced_tightvnc_viewer/Windows/util')
-rwxr-xr-x | x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/connect_br.tcl | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/connect_br.tcl b/x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/connect_br.tcl index 53d5e27..ec2e0b0 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/connect_br.tcl +++ b/x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/connect_br.tcl @@ -1086,11 +1086,25 @@ proc proxy_hostport {proxy} { proc setb {} { wm withdraw . + catch {destroy .b} button .b -text "CONNECT_BR" -command {destroy .} pack .b after 1000 check_callback } +proc connect_br_sleep {} { + global env + if [info exists env(CONNECT_BR_SLEEP)] { + if [regexp {^[0-9][0-9]*$} $env(CONNECT_BR_SLEEP)] { + setb + for {set i 0} {$i < $env(CONNECT_BR_SLEEP)} {incr i} { + bmesg "$i sleep" + after 1000 + } + } + } +} + global env set got_connection 0 @@ -1220,16 +1234,32 @@ if {$do_bridge} { destroy . exit 1 } + setb set rc [catch {set lsock [socket $rhost $rport]}] if {$rc != 0} { puts stderr "error reversing" + bmesg "1 error reversing" + after 2000 + set rc [catch {set lsock [socket $rhost $rport]}] + } + if {$rc != 0} { + puts stderr "error reversing" + bmesg "2 error reversing" + after 2000 + set rc [catch {set lsock [socket $rhost $rport]}] + } + if {$rc != 0} { + puts stderr "error reversing" + bmesg "3 error reversing" destroy .; exit 1 } puts stderr "SSVNC_REVERSE to $rhost $rport OK"; - setb + bmesg "SSVNC_REVERSE to $rhost $rport OK"; + connect_br_sleep handle_connection $lsock $rhost $rport } else { set lport $env(SSVNC_LISTEN) + connect_br_sleep set rc [catch {set lsock [socket -myaddr 127.0.0.1 -server handle_connection $lport]}] if {$rc != 0} { puts stderr "error listening" |