Changeset 2643 for trunk


Ignore:
Timestamp:
Oct 21, 2011, 4:21:42 PM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/visviewer.tcl

    r2624 r2643  
    7272
    7373    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            }
    7779        }
    7880    }
     
    8183    }
    8284    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
    8388        CheckNameList $namelist
    8489        set _servers($tag) $namelist
     
    157162#   Shuffle the list of server hosts.
    158163#
    159 itcl::body Rappture::VisViewer::Shuffle { hostlist } {
    160     set hosts [split $hostlist ,]
     164itcl::body Rappture::VisViewer::Shuffle { hosts } {
    161165    set randomHosts {}
    162166    set ticks [clock clicks]
     
    211215    foreach {hostname port} [split [lindex $servers 0] :] break
    212216    set servers [lrange $servers 1 end]
    213    
    214217    while {1} {
    215218        puts stderr "connecting to $hostname:$port..."
Note: See TracChangeset for help on using the changeset viewer.