[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Thu, 05 Apr 2007 22:04:50 -0000


raeburn		Thu Apr  5 18:04:50 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  &get_dom should return an empty hash if the target db file does not exist.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.865 loncom/lonnet/perl/lonnet.pm:1.866
--- loncom/lonnet/perl/lonnet.pm:1.865	Wed Apr  4 14:01:11 2007
+++ loncom/lonnet/perl/lonnet.pm	Thu Apr  5 18:04:49 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.865 2007/04/04 18:01:11 raeburn Exp $
+# $Id: lonnet.pm,v 1.866 2007/04/05 22:04:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -756,6 +756,10 @@
     }
     if ($udom && $uhome && ($uhome ne 'no_host')) {
         my $rep=&reply("getdom:$udom:$namespace:$items",$uhome);
+        my %returnhash;
+        if ($rep =~ /^error: 2 /) {
+            return %returnhash;
+        }
         my @pairs=split(/\&/,$rep);
         if ( $#pairs==0 && $pairs[0] =~ /^(con_lost|error|no_such_host)/i) {
             return @pairs;