version 1.19, 2003/12/08 20:32:17
|
version 1.22, 2004/01/05 09:30:10
|
Line 67 sub ReadConfig {
|
Line 67 sub ReadConfig {
|
my $perlvarref = read_conf('loncapa.conf'); |
my $perlvarref = read_conf('loncapa.conf'); |
%perlvar = %{$perlvarref}; |
%perlvar = %{$perlvarref}; |
my $hoststab = read_hosts( |
my $hoststab = read_hosts( |
"$perlvar{'lonTabDir'}/hosts.tab") || |
"$perlvar{lonTabDir}/hosts.tab") || |
die "Can't read host table!!"; |
die "Can't read host table!!"; |
%hostshash = %{$hoststab}; |
%hostshash = %{$hoststab}; |
$ConfigRead = 1; |
$ConfigRead = 1; |
Line 127 sub Dump {
|
Line 127 sub Dump {
|
my $self = shift; |
my $self = shift; |
my $key; |
my $key; |
my $value; |
my $value; |
print "Dumping LondConnectionObject:\n"; |
print STDERR "Dumping LondConnectionObject:\n"; |
while(($key, $value) = each %$self) { |
while(($key, $value) = each %$self) { |
print "$key -> $value\n"; |
print STDERR "$key -> $value\n"; |
} |
} |
print "-------------------------------\n"; |
print "-------------------------------\n"; |
} |
} |
Line 562 Shuts down the socket.
|
Line 562 Shuts down the socket.
|
sub Shutdown { |
sub Shutdown { |
my $self = shift; |
my $self = shift; |
my $socket = $self->GetSocket(); |
my $socket = $self->GetSocket(); |
$socket->send("exit\n", 0); # Ask lond to exit too. Non blocking so |
Debug(5,"socket is -$socket-"); |
# there's no cost for failure. |
if ($socket) { |
$socket->shutdown(2); |
# Ask lond to exit too. Non blocking so |
|
# there is no cost for failure. |
|
eval { |
|
$socket->send("exit\n", 0); |
|
$socket->shutdown(2); |
|
} |
|
} |
} |
} |
|
|
=pod |
=pod |
Line 786 sub read_conf
|
Line 792 sub read_conf
|
my %perlvar; |
my %perlvar; |
foreach my $filename (@conf_files,'loncapa_apache.conf') |
foreach my $filename (@conf_files,'loncapa_apache.conf') |
{ |
{ |
|
if($DebugLevel > 3) { |
|
print("Going to read $confdir.$filename\n"); |
|
} |
open(CONFIG,'<'.$confdir.$filename) or |
open(CONFIG,'<'.$confdir.$filename) or |
die("Can't read $confdir$filename"); |
die("Can't read $confdir$filename"); |
while (my $configline=<CONFIG>) |
while (my $configline=<CONFIG>) |
Line 799 sub read_conf
|
Line 808 sub read_conf
|
} |
} |
close(CONFIG); |
close(CONFIG); |
} |
} |
|
if($DebugLevel > 3) { |
|
print "Dumping perlvar:\n"; |
|
foreach my $var (keys %perlvar) { |
|
print "$var = $perlvar{$var}\n"; |
|
} |
|
} |
my $perlvarref=\%perlvar; |
my $perlvarref=\%perlvar; |
return ($perlvarref); |
return $perlvarref; |
} |
} |
|
|
#---------------------- Subroutine read_hosts: Read a LON-CAPA hosts.tab |
#---------------------- Subroutine read_hosts: Read a LON-CAPA hosts.tab |
# formatted configuration file. |
# formatted configuration file. |