version 1.47, 2004/06/01 10:02:13
|
version 1.49, 2004/06/17 22:37:06
|
Line 103 my $RecentLogEntry = "";
|
Line 103 my $RecentLogEntry = "";
|
my $ConnectionRetries=2; # Number of connection retries allowed. |
my $ConnectionRetries=2; # Number of connection retries allowed. |
my $ConnectionRetriesLeft=2; # Number of connection retries remaining. |
my $ConnectionRetriesLeft=2; # Number of connection retries remaining. |
my $LondVersion = "unknown"; # Version of lond we talk with. |
my $LondVersion = "unknown"; # Version of lond we talk with. |
|
my $KeyMode = ""; # e.g. ssl, local, insecure from last connect. |
|
|
# |
# |
# The hash below gives the HTML format for log messages |
# The hash below gives the HTML format for log messages |
Line 232 sub SocketDump {
|
Line 233 sub SocketDump {
|
my ($level, $socket) = @_; |
my ($level, $socket) = @_; |
|
|
if($level <= $DebugLevel) { |
if($level <= $DebugLevel) { |
$socket->Dump(); |
$socket->Dump(-1); # Ensure it will get dumped. |
} |
} |
} |
} |
|
|
Line 265 sub SocketTimeout {
|
Line 266 sub SocketTimeout {
|
my $Socket = shift; |
my $Socket = shift; |
Log("WARNING", "A socket timeout was detected"); |
Log("WARNING", "A socket timeout was detected"); |
Debug(0, " SocketTimeout called: "); |
Debug(0, " SocketTimeout called: "); |
$Socket->Dump(); |
$Socket->Dump(0); |
if(exists($ActiveTransactions{$Socket})) { |
if(exists($ActiveTransactions{$Socket})) { |
FailTransaction($ActiveTransactions{$Socket}); |
FailTransaction($ActiveTransactions{$Socket}); |
} |
} |
Line 292 sub Tick {
|
Line 293 sub Tick {
|
my $client; |
my $client; |
if($ConnectionRetriesLeft > 0) { |
if($ConnectionRetriesLeft > 0) { |
ShowStatus(GetServerHost()." Connection count: ".$ConnectionCount |
ShowStatus(GetServerHost()." Connection count: ".$ConnectionCount |
." Retries remaining: ".$ConnectionRetriesLeft); |
." Retries remaining: ".$ConnectionRetriesLeft |
|
." ($KeyMode)"); |
} else { |
} else { |
ShowStatus(GetServerHost()." >> DEAD <<"); |
ShowStatus(GetServerHost()." >> DEAD <<"); |
} |
} |
Line 347 sub Tick {
|
Line 349 sub Tick {
|
} |
} |
|
|
} |
} |
|
if ($ConnectionCount == 0) { |
|
$KeyMode = ""; |
|
} |
} |
} |
|
|
=pod |
=pod |
Line 387 long enough, it will be shut down and re
|
Line 392 long enough, it will be shut down and re
|
|
|
sub ServerToIdle { |
sub ServerToIdle { |
my $Socket = shift; # Get the socket. |
my $Socket = shift; # Get the socket. |
|
$KeyMode = $Socket->{AuthenticationMode}; |
delete($ActiveTransactions{$Socket}); # Server has no transaction |
delete($ActiveTransactions{$Socket}); # Server has no transaction |
|
|
&Debug(5, "Server to idle"); |
&Debug(5, "Server to idle"); |
Line 1441 sub ChildStatus {
|
Line 1447 sub ChildStatus {
|
my $state = $Socket->GetState(); |
my $state = $Socket->GetState(); |
print $fh "Connection $i State: $state\n"; |
print $fh "Connection $i State: $state\n"; |
print STDERR "---------------------- Connection $i \n"; |
print STDERR "---------------------- Connection $i \n"; |
$Socket->Dump(); |
$Socket->Dump(-1); # Ensure it gets dumped.. |
$i++; |
$i++; |
} |
} |
} |
} |