Calculate non-overlapping UID based port numbers when running sics from your home directory

r2167 | ffr | 2007-09-26 16:23:57 +1000 (Wed, 26 Sep 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-09-26 16:23:57 +10:00
committed by Douglas Clowes
parent a173158d0e
commit 72e0d389e5

View File

@@ -1,7 +1,7 @@
# Some useful functions for SICS configuration. # Some useful functions for SICS configuration.
# $Revision: 1.6 $ # $Revision: 1.7 $
# $Date: 2007-08-20 22:52:25 $ # $Date: 2007-09-26 06:23:57 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au) # Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by $Author: ffr $ # Last revision by $Author: ffr $
@@ -270,7 +270,7 @@ proc ::utility::get_portnum {port} {
set home_path_list [split [string trim $env(HOME) /] /] set home_path_list [split [string trim $env(HOME) /] /]
set pwd_path_list [split [string trim $env(PWD) /] /] set pwd_path_list [split [string trim $env(PWD) /] /]
if [lstarts_with $pwd_path_list $home_path_list] { if [lstarts_with $pwd_path_list $home_path_list] {
return [expr $sics_port($port) + [::utility::GetUID $tcl_platform(user)]] return [expr $sics_port($port) + 10*([::utility::GetUID $tcl_platform(user)]-999)]
} else { } else {
return [portnum $port] return [portnum $port]
} }