From c10f718a570bc36c667ba2deb24e0535f9cef517 Mon Sep 17 00:00:00 2001
From: "Leigh B. Stoller" <stoller@flux.utah.edu>
Date: Wed, 22 May 2002 21:23:45 +0000
Subject: [PATCH] Minor fixes to uselatestwadata stuff now that test suite is
 running again. No biggie.

---
 tbsetup/ns2ir/parse.tcl.in     | 3 +++
 tbsetup/ns2ir/sim.tcl.in       | 2 +-
 tbsetup/ns2ir/tb_compat.tcl.in | 8 ++++----
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/tbsetup/ns2ir/parse.tcl.in b/tbsetup/ns2ir/parse.tcl.in
index ffea5e3bd7..5677b2215e 100644
--- a/tbsetup/ns2ir/parse.tcl.in
+++ b/tbsetup/ns2ir/parse.tcl.in
@@ -176,6 +176,9 @@ namespace eval GLOBALS {
     # These are going to be default values within the NS file.
     variable default_ip_routing_type "none"
 
+    # For remote nodes. Use latest widearea data.
+    variable uselatestwadata 0
+
     # This is the file handler for the warnings file
     variable WARN_FILE [open "$eid.warnings" w]
 
diff --git a/tbsetup/ns2ir/sim.tcl.in b/tbsetup/ns2ir/sim.tcl.in
index 4e357306c8..55cbe1c358 100644
--- a/tbsetup/ns2ir/sim.tcl.in
+++ b/tbsetup/ns2ir/sim.tcl.in
@@ -284,7 +284,7 @@ Simulator instproc run {} {
     var_import ::GLOBALS::DB
     var_import ::GLOBALS::impotent
     var_import ::GLOBALS::vtypes
-    var_import ::TBCOMPAT::uselatestwadata
+    var_import ::GLOBALS::uselatestwadata
 
     # Fill out IPs
     foreach obj [concat [array names lanlink_list]] {
diff --git a/tbsetup/ns2ir/tb_compat.tcl.in b/tbsetup/ns2ir/tb_compat.tcl.in
index 1ff817869a..e9dde9a824 100644
--- a/tbsetup/ns2ir/tb_compat.tcl.in
+++ b/tbsetup/ns2ir/tb_compat.tcl.in
@@ -21,9 +21,6 @@ namespace eval TBCOMPAT {
     # This is the default weight for a hard vtype.
     variable default_hard_vtype_weight 1.0
 
-    # For remote nodes. Use latest info.
-    variable uselatestwadata 0
-
     # This is a general procedure that takes a node, an object (lan or link)
     # it is connected to, and an IP address, and sets the IP address
     # for the node on that object.  It checks both the validity of the
@@ -371,6 +368,7 @@ proc tb-fix-node {vnode pnode} {
 
 proc tb-make-soft-vtype {name types} {
     var_import ::TBCOMPAT::hwtypes
+    var_import ::TBCOMPAT::isremote
     var_import ::GLOBALS::vtypes
     var_import ::TBCOMPAT::default_soft_vtype_weight
 
@@ -387,6 +385,7 @@ proc tb-make-soft-vtype {name types} {
 
 proc tb-make-hard-vtype {name types} {
     var_import ::TBCOMPAT::hwtypes
+    var_import ::TBCOMPAT::isremote
     var_import ::GLOBALS::vtypes
     var_import ::TBCOMPAT::default_hard_vtype_weight
 
@@ -403,6 +402,7 @@ proc tb-make-hard-vtype {name types} {
 
 proc tb-make-weighted-vtype {name weight types} {
     var_import ::TBCOMPAT::hwtypes
+    var_import ::TBCOMPAT::isremote
     var_import ::GLOBALS::vtypes
     var_import ::TBCOMPAT::FLOAT
 
@@ -494,7 +494,7 @@ proc tb-set-lan-simplex-params {lan node todelay tobw toloss fromdelay frombw fr
 }
 
 proc tb-set-uselatestwadata {onoff} {
-    var_import ::TBCOMPAT::uselatestwadata
+    var_import ::GLOBALS::uselatestwadata
 
     if {$onoff != 0 && $onoff != 1} {
 	perror "\[tb-set-uselatestwadata] $onoff must be 0/1"
-- 
GitLab