[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sun Oct 16 10:24:39 EDT 2011
raeburn Sun Oct 16 14:24:39 2011 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Check response from &reply() for ls3, ls3 and ls for responses that are
not directory contents listings, i.e., no_such_host, con_lost etc.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1134 loncom/lonnet/perl/lonnet.pm:1.1135
--- loncom/lonnet/perl/lonnet.pm:1.1134 Fri Oct 14 22:05:19 2011
+++ loncom/lonnet/perl/lonnet.pm Sun Oct 16 14:24:39 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1134 2011/10/14 22:05:19 raeburn Exp $
+# $Id: lonnet.pm,v 1.1135 2011/10/16 14:24:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8249,23 +8249,26 @@
if($udom) {
if($uname) {
+ my $uhome = &homeserver($uname,$udom);
+ return if ($uhome eq 'no_host');
$listing = &reply('ls3:'.&escape('/'.$uri).':'.$getpropath.':'
.$getuserdir.':'.&escape($dirRoot)
- .':'.&escape($uname).':'.&escape($udom),
- &homeserver($uname,$udom));
+ .':'.&escape($uname).':'.&escape($udom),$uhome);
if ($listing eq 'unknown_cmd') {
- $listing = &reply('ls2:'.$dirRoot.'/'.$uri,
- &homeserver($uname,$udom));
+ $listing = &reply('ls2:'.$dirRoot.'/'.$uri,$uhome);
} else {
@listing_results = map { &unescape($_); } split(/:/,$listing);
}
if ($listing eq 'unknown_cmd') {
- $listing = &reply('ls:'.$dirRoot.'/'.$uri,
- &homeserver($uname,$udom));
+ $listing = &reply('ls:'.$dirRoot.'/'.$uri,$uhome);
@listing_results = split(/:/,$listing);
} else {
@listing_results = map { &unescape($_); } split(/:/,$listing);
}
+ if (($listing eq 'no_such_host') || ($listing eq 'con_lost') ||
+ ($listing eq 'rejected') || ($listing eq 'refused')) {
+ return;
+ }
return @listing_results;
} elsif(!$alternateRoot) {
my %allusers;
More information about the LON-CAPA-cvs
mailing list