From 290c5f1327f0f31dbb69442afd0eb3fa32832446 Mon Sep 17 00:00:00 2001
From: Shashi Guruprasad <shash@flux.utah.edu>
Date: Fri, 16 Aug 2002 16:57:54 +0000
Subject: [PATCH] Fix in dotrafficconfig(). While adding the REMOTE() check, a
 variable's scope was inadvartently reduced to the if block instead of the
 entire dotrafficconfig() function. This caused nse not to start up
 automatically

---
 tmcd/common/libsetup.pm | 3 ++-
 tmcd/libsetup.pm        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tmcd/common/libsetup.pm b/tmcd/common/libsetup.pm
index c236015a61..fc51cb2697 100644
--- a/tmcd/common/libsetup.pm
+++ b/tmcd/common/libsetup.pm
@@ -1139,6 +1139,7 @@ sub dotrafficconfig()
     my $TM;
     my $boss;
     my $startnse = 0;
+    my $nseconfig = "";
     
     #
     # Kinda ugly, but there is too much perl goo included by Socket to put it
@@ -1283,7 +1284,7 @@ sub dotrafficconfig()
 	$TM = OPENTMCC(TMCCCMD_NSECONFIGS);
 	$record_sep = $/;
 	undef($/);
-	my $nseconfig = <$TM>;
+	$nseconfig = <$TM>;
 	$/ = $record_sep;
 	print NSECFG $nseconfig;
 	CLOSETMCC($TM);
diff --git a/tmcd/libsetup.pm b/tmcd/libsetup.pm
index c236015a61..fc51cb2697 100644
--- a/tmcd/libsetup.pm
+++ b/tmcd/libsetup.pm
@@ -1139,6 +1139,7 @@ sub dotrafficconfig()
     my $TM;
     my $boss;
     my $startnse = 0;
+    my $nseconfig = "";
     
     #
     # Kinda ugly, but there is too much perl goo included by Socket to put it
@@ -1283,7 +1284,7 @@ sub dotrafficconfig()
 	$TM = OPENTMCC(TMCCCMD_NSECONFIGS);
 	$record_sep = $/;
 	undef($/);
-	my $nseconfig = <$TM>;
+	$nseconfig = <$TM>;
 	$/ = $record_sep;
 	print NSECFG $nseconfig;
 	CLOSETMCC($TM);
-- 
GitLab