- Timestamp:
- Oct 21, 2011, 4:21:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/visviewer.tcl
r2624 r2643 72 72 73 73 private proc CheckNameList { namelist } { 74 set pattern {^[a-zA-Z0-9\.]+:[0-9]+(,[a-zA-Z0-9\.]+:[0-9]+)*$} 75 if { ![regexp $pattern $namelist match] } { 76 error "bad visualization server address \"$namelist\": should be host:port,host:port,..." 74 foreach host $namelist { 75 set pattern {^[a-zA-Z0-9\.]+:[0-9]} 76 if { ![regexp $pattern $host match] } { 77 error "bad visualization server address \"$host\": should be host:port,host:port,..." 78 } 77 79 } 78 80 } … … 81 83 } 82 84 public proc SetServerList { tag namelist } { 85 # Convert the comma separated list into a Tcl list. OGRE also adds 86 # a trailing comma that we want to ignore. 87 regsub -all "," $namelist " " namelist 83 88 CheckNameList $namelist 84 89 set _servers($tag) $namelist … … 157 162 # Shuffle the list of server hosts. 158 163 # 159 itcl::body Rappture::VisViewer::Shuffle { hostlist } { 160 set hosts [split $hostlist ,] 164 itcl::body Rappture::VisViewer::Shuffle { hosts } { 161 165 set randomHosts {} 162 166 set ticks [clock clicks] … … 211 215 foreach {hostname port} [split [lindex $servers 0] :] break 212 216 set servers [lrange $servers 1 end] 213 214 217 while {1} { 215 218 puts stderr "connecting to $hostname:$port..."
Note: See TracChangeset
for help on using the changeset viewer.