--- loncom/auth/lonracc.pm 2007/02/01 07:13:04 1.20 +++ loncom/auth/lonracc.pm 2007/03/02 23:43:29 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network # Access Handler for File Transfers # -# $Id: lonracc.pm,v 1.20 2007/02/01 07:13:04 albertel Exp $ +# $Id: lonracc.pm,v 1.22 2007/03/02 23:43:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,7 +39,7 @@ sub subscribed { return 0 if (!-e "$filename.subscription"); - my $hostname=$Apache::lonnet::hostname{$id}; + my $hostname=&Apache::lonnet::hostname($id); my (undef,undef,undef,undef,$ip) = gethostbyname($hostname); return 0 if (length($ip) != 4); @@ -65,9 +65,8 @@ sub handler { } my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP); - my %iphost=&Apache::lonnet::get_iphost(); - my $hostids=$iphost{$reqhost}; - if (!$hostids && $reqhost ne '127.0.0.1' ) { + my @hostids= &Apache::lonnet::get_hosts_from_ip($reqhost); + if (!@hostids && $reqhost ne '127.0.0.1' ) { $r->log_reason("Unable to find a host for ". $r->get_remote_host(REMOTE_NOLOOKUP)); return FORBIDDEN; @@ -78,7 +77,7 @@ sub handler { my $return; my @ids; - foreach my $id (@{$hostids}) { + foreach my $id (@hostids) { my $uri =$r->uri; if (($filename=~/\.meta$/) || ($uri=~m|^/raw/uploaded|) ||