[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 20 Apr 2007 21:48:17 -0000
albertel Fri Apr 20 17:48:17 2007 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- switch to only making available as globals that which needs to be
- dns default was incorrectly defaulting to hosts.tab in both cases
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.870 loncom/lonnet/perl/lonnet.pm:1.871
--- loncom/lonnet/perl/lonnet.pm:1.870 Wed Apr 11 20:03:08 2007
+++ loncom/lonnet/perl/lonnet.pm Fri Apr 20 17:48:09 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.870 2007/04/12 00:03:08 albertel Exp $
+# $Id: lonnet.pm,v 1.871 2007/04/20 21:48:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,12 +33,13 @@
use LWP::UserAgent();
use HTTP::Date;
# use Date::Parse;
-use vars
-qw(%perlvar %badServerCache %spareid
- %pr %prp $memcache %packagetab
- %courselogs %accesshash %userrolehash %domainrolehash $processmarker $dumpcount
- %coursedombuf %coursenumbuf %coursehombuf %coursedescrbuf %courseinstcodebuf %courseownerbuf %coursetypebuf
- $tmpdir $_64bit %env);
+use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir
+ $_64bit %env);
+
+my (%badServerCache, $memcache, %courselogs, %accesshash, %domainrolehash,
+ %userrolehash, $processmarker, $dumpcount, %coursedombuf,
+ %coursenumbuf, %coursehombuf, %coursedescrbuf, %courseinstcodebuf,
+ %courseownerbuf, %coursetypebuf);
use IO::Socket;
use GDBM_File;
@@ -5293,7 +5294,7 @@
my ($user, $path, @files) = @_;
my $filename = $user."savedfiles";
my @other_files = &files_not_in_path($user, $path);
- open (OUT, '>'.$Apache::lonnet::perlvar{'lonDaemons'}.'/tmp/'.$filename);
+ open (OUT, '>'.$tmpdir.$filename);
foreach my $file (@files) {
print (OUT $env{'form.currentpath'}.$file."\n");
}
@@ -7709,8 +7710,9 @@
return;
}
close($config);
- &logthis("unable to contact DNS defaulting to on disk file\n");
- open($config,"<$perlvar{'lonTabDir'}/dns_hosts.tab");
+ my $which = (split('/',$url))[3];
+ &logthis("unable to contact DNS defaulting to on disk file dns_$which.tab\n");
+ open($config,"<$perlvar{'lonTabDir'}/dns_$which.tab");
my @content = <$config>;
&$func(\@content);
return;