[LON-CAPA-cvs] cvs: loncom / lond

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 10 Apr 2007 23:11:31 -0000


albertel		Tue Apr 10 19:11:31 2007 EDT

  Modified files:              
    /loncom	lond 
  Log:
  - eliminate a unneeded global
  
  
Index: loncom/lond
diff -u loncom/lond:1.372 loncom/lond:1.373
--- loncom/lond:1.372	Tue Apr  3 20:49:13 2007
+++ loncom/lond	Tue Apr 10 19:11:30 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.372 2007/04/04 00:49:13 albertel Exp $
+# $Id: lond,v 1.373 2007/04/10 23:11:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.372 $'; #' stupid emacs
+my $VERSION='$Revision: 1.373 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -69,7 +69,6 @@
 my $clientname;			# LonCAPA name of client.
 
 my $server;
-my $thisserver;			# DNS of us.
 
 my $keymode;
 
@@ -172,19 +171,16 @@
 #   $Socket      - Socket open on client.
 #   $initcmd     - The full text of the init command.
 #
-# Implicit inputs:
-#    $thisserver - Our DNS name.
-#
 # Returns:
 #     IDEA session key on success.
 #     undef on failure.
 #
 sub LocalConnection {
     my ($Socket, $initcmd) = @_;
-    Debug("Attempting local connection: $initcmd client: $clientip me: $thisserver");
+    Debug("Attempting local connection: $initcmd client: $clientip");
     if($clientip ne "127.0.0.1") {
 	&logthis('<font color="red"> LocalConnection rejecting non local: '
-		 ."$clientip ne $thisserver </font>");
+		 ."$clientip ne 127.0.0.1 </font>");
 	close $Socket;
 	return undef;
     }  else {
@@ -4907,7 +4903,7 @@
     $SIG{__DIE__}='DEFAULT';
     &status("Catching exception");
     &logthis("<font color='red'>CRITICAL: "
-     ."ABNORMAL EXIT. Child $$ for server $thisserver died through "
+     ."ABNORMAL EXIT. Child $$ for server ".$perlvar{'lonHostID'}." died through "
      ."a crash with this error msg->[$error]</font>");
     &logthis('Famous last words: '.$status.' - '.$lastlog);
     if ($client) { print $client "error: $error\n"; }
@@ -6018,7 +6014,7 @@
                 # the metadata
 		unless ($fname=~/\.meta$/) { &unsub("$fname.meta",$clientip); }
 		$fname=~s/\/home\/httpd\/html\/res/raw/;
-		$fname="http://$thisserver/".$fname;
+		$fname="http://".&Apache::lonnet::hostname($perlvar{'lonHostID'})."/".$fname;
 		$result="$fname\n";
 	    }
 	} else {