[LON-CAPA-cvs] cvs: loncom / loncnew
foxr
lon-capa-cvs@mail.lon-capa.org
Mon, 27 Oct 2003 10:09:21 -0000
foxr Mon Oct 27 05:09:21 2003 EDT
Modified files:
/loncom loncnew
Log:
Tighten up a few compares to eq and flip a few debug levels around... nothing
critical
Index: loncom/loncnew
diff -u loncom/loncnew:1.29 loncom/loncnew:1.30
--- loncom/loncnew:1.29 Tue Oct 21 10:24:42 2003
+++ loncom/loncnew Mon Oct 27 05:09:21 2003
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# lonc maintains the connections to remote computers
#
-# $Id: loncnew,v 1.29 2003/10/21 14:24:42 foxr Exp $
+# $Id: loncnew,v 1.30 2003/10/27 10:09:21 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,6 +45,10 @@
# Change log:
# $Log: loncnew,v $
+# Revision 1.30 2003/10/27 10:09:21 foxr
+# Tighten up a few compares to eq and flip a few debug levels around... nothing
+# critical
+#
# Revision 1.29 2003/10/21 14:24:42 foxr
# Fix little typo that may explain growth of connections
#
@@ -201,8 +205,8 @@
my $IdleSeconds = 0; # Number of seconds idle.
my $Status = ""; # Current status string.
my $RecentLogEntry = "";
-my $ConnectionRetries=5; # Number of connection retries allowed.
-my $ConnectionRetriesLeft=5; # Number of connection retries remaining.
+my $ConnectionRetries=2; # Number of connection retries allowed.
+my $ConnectionRetriesLeft=2; # Number of connection retries remaining.
#
# The hash below gives the HTML format for log messages
@@ -669,10 +673,10 @@
sub FailTransaction {
my $transaction = shift;
Log("WARNING", "Failing transaction ".$transaction->getRequest());
- Debug(5, "Failing transaction: ".$transaction->getRequest());
+ Debug(1, "Failing transaction: ".$transaction->getRequest());
if (!$transaction->isDeferred()) { # If the transaction is deferred we'll get to it.
my $client = $transaction->getClient();
- Debug(5," Replying con_lost to ".$transaction->getRequest());
+ Debug(1," Replying con_lost to ".$transaction->getRequest());
StartClientReply($transaction, "con_lost\n");
}
if($ConnectionRetriesLeft <= 0) {
@@ -1133,7 +1137,7 @@
my $Connection = LondConnection->new(&GetServerHost(),
&GetServerPort());
- if($Connection == undef) { # Needs to be more robust later.
+ if($Connection eq undef) { # Needs to be more robust later.
Log("CRITICAL","Failed to make a connection with lond.");
$ConnectionRetriesLeft--;
return 0; # Failure.
@@ -1145,7 +1149,7 @@
# exchange underway.
#
my $Socket = $Connection->GetSocket();
- if($Socket == undef) {
+ if($Socket eq undef) {
die "did not get a socket from the connection";
} else {
&Debug(9,"MakeLondConnection got socket: ".$Socket);