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

www lon-capa-cvs@mail.lon-capa.org
Thu, 10 Oct 2002 13:06:08 -0000


www		Thu Oct 10 09:06:08 2002 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Better error logs on failed remote file transfers
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.294 loncom/lonnet/perl/lonnet.pm:1.295
--- loncom/lonnet/perl/lonnet.pm:1.294	Wed Oct  9 13:24:06 2002
+++ loncom/lonnet/perl/lonnet.pm	Thu Oct 10 09:06:08 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.294 2002/10/09 17:24:06 matthew Exp $
+# $Id: lonnet.pm,v 1.295 2002/10/10 13:06:08 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -840,13 +840,16 @@
     }
 # Notify homeserver to grep it
 #
-    if 
-(&reply('fetchuserfile:'.$docudom.'/'.$docuname.'/'.$fname,$docuhome) eq 'ok') 
-    {
+    
+    my $fetchresult= 
+ &reply('fetchuserfile:'.$docudom.'/'.$docuname.'/'.$fname,$docuhome);
+    if ($fetchresult eq 'ok') {
 #
 # Return the URL to it
         return '/uploaded/'.$path.$fname;
     } else {
+        &logthis('Failed to transfer '.$docudom.'/'.$docuname.'/'.$fname.
+         ' to host '.$docuhome.': '.$fetchresult);
         return '/adm/notfound.html';
     }    
 }