[LON-CAPA-cvs] cvs: loncom / lond /auth lonauth.pm switchserver.pm
raeburn
raeburn@source.lon-capa.org
Wed, 18 Aug 2010 19:25:12 -0000
raeburn Wed Aug 18 19:25:12 2010 EDT
Modified files:
/loncom lond
/loncom/auth lonauth.pm switchserver.pm
Log:
- lonnet::get_internet_names() returns a reference to an array.
Index: loncom/lond
diff -u loncom/lond:1.451 loncom/lond:1.452
--- loncom/lond:1.451 Tue Aug 17 20:06:25 2010
+++ loncom/lond Wed Aug 18 19:25:09 2010
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.451 2010/08/17 20:06:25 raeburn Exp $
+# $Id: lond,v 1.452 2010/08/18 19:25:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.451 $'; #' stupid emacs
+my $VERSION='$Revision: 1.452 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -1789,7 +1789,11 @@
unless ($clientcancheckhost) {
my $uprimary_id = &Apache::lonnet::domain($udom,'primary');
my $uint_dom = &Apache::lonnet::internet_dom($uprimary_id);
- my @intdoms = &Apache::lonnet::get_internet_names($clientname);
+ my @intdoms;
+ my $internet_names = &Apache::lonnet::get_internet_names($clientname);
+ if (ref($internet_names) eq 'ARRAY') {
+ @intdoms = @{$internet_names};
+ }
unless ($uint_dom ne '' && grep(/^\Q$uint_dom\E$/,@intdoms)) {
my ($remote,$hosted);
my $remotesession = &get_usersession_config($udom,'remotesession');
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.107 loncom/auth/lonauth.pm:1.108
--- loncom/auth/lonauth.pm:1.107 Sat Jul 24 17:42:46 2010
+++ loncom/auth/lonauth.pm Wed Aug 18 19:25:12 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.107 2010/07/24 17:42:46 raeburn Exp $
+# $Id: lonauth.pm,v 1.108 2010/08/18 19:25:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -423,7 +423,11 @@
my $canhost = 1;
my $lonhost = $r->dir_config('lonHostID');
my $udom = $form->{'udom'};
- my @intdoms = &Apache::lonnet::get_internet_names($lonhost);
+ my @intdoms;
+ my $internet_names = &Apache::lonnet::get_internet_names($lonhost);
+ if (ref($internet_names) eq 'ARRAY') {
+ @intdoms = @{$internet_names};
+ }
my $uprimary_id = &Apache::lonnet::domain($udom,'primary');
my $uint_dom = &Apache::lonnet::internet_dom($uprimary_id);
unless ($uint_dom ne '' && grep(/^\Q$uint_dom\E$/,@intdoms)) {
Index: loncom/auth/switchserver.pm
diff -u loncom/auth/switchserver.pm:1.28 loncom/auth/switchserver.pm:1.29
--- loncom/auth/switchserver.pm:1.28 Thu Jul 22 21:44:25 2010
+++ loncom/auth/switchserver.pm Wed Aug 18 19:25:12 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Switch Servers Handler
#
-# $Id: switchserver.pm,v 1.28 2010/07/22 21:44:25 raeburn Exp $
+# $Id: switchserver.pm,v 1.29 2010/08/18 19:25:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -120,7 +120,11 @@
my $canhost = 1;
my $uprimary_id = &Apache::lonnet::domain($env{'user.domain'},'primary');
my $uint_dom = &Apache::lonnet::internet_dom($uprimary_id);
- my @intdoms = &Apache::lonnet::get_internet_names($env{'form.otherserver'});
+ my @intdoms;
+ my $internet_names = &Apache::lonnet::get_internet_names($env{'form.otherserver'});
+ if (ref($internet_names) eq 'ARRAY') {
+ @intdoms = @{$internet_names};
+ }
unless ($uint_dom ne '' && grep(/^\Q$uint_dom\E$/,@intdoms)) {
my $serverhomeID = &Apache::lonnet::get_server_homeID($switch_to);
my $serverhomedom = &Apache::lonnet::host_domain($serverhomeID);