[LON-CAPA-cvs] cvs: loncom /interface lonchatfetch.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 16 Sep 2002 20:15:11 -0000


www		Mon Sep 16 16:15:11 2002 EDT

  Modified files:              
    /loncom/interface	lonchatfetch.pm 
  Log:
  Overload protection - frivolous to generate all of these hits if machine
  overloaded.
  
  
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.5 loncom/interface/lonchatfetch.pm:1.6
--- loncom/interface/lonchatfetch.pm:1.5	Fri Sep 13 15:32:09 2002
+++ loncom/interface/lonchatfetch.pm	Mon Sep 16 16:15:10 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Chat Fetching
 #
-# $Id: lonchatfetch.pm,v 1.5 2002/09/13 19:32:09 www Exp $
+# $Id: lonchatfetch.pm,v 1.6 2002/09/16 20:15:10 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,6 +36,14 @@
 
 sub handler {
     my $r = shift;
+
+    my $loaderror=&Apache::lonnet::overloaderror($r);
+    if ($loaderror) { return $loaderror; }
+    $loaderror=
+       &Apache::lonnet::overloaderror($r,
+         $ENV{'course.'.$ENV{'request.course.id'}.'.home'});
+    if ($loaderror) { return $loaderror; }
+
     $r->content_type('text/html');
     $r->send_http_header;
     return OK if $r->header_only;