[LON-CAPA-cvs] cvs: loncom / lond
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 07 Mar 2003 15:04:00 -0000
matthew Fri Mar 7 10:04:00 2003 EDT
Modified files:
/loncom lond
Log:
Since GDBM does not bother to check to see if the file it wants exists before
trying to open it a 'bad block error' will result when a non-existant file
is tied. lond now reports: "error:No such file or GDBM reported bad block
error\n" when this occurs on a 'get' call so we don't bother logging the
error every time a file is requested that does not exist.
&Apache::lonnet::EXT() in particular expects an error of this form.
Index: loncom/lond
diff -u loncom/lond:1.111 loncom/lond:1.112
--- loncom/lond:1.111 Tue Mar 4 17:32:20 2003
+++ loncom/lond Fri Mar 7 10:04:00 2003
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.111 2003/03/04 22:32:20 matthew Exp $
+# $Id: lond,v 1.112 2003/03/07 15:04:00 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1139,9 +1139,14 @@
"while attempting get\n";
}
} else {
- print $client "error: ".($!+0)
- ." tie(GDBM) Failed ".
- "while attempting get\n";
+ if ($!+0 == 2) {
+ print $client "error:No such file or ".
+ "GDBM reported bad block error\n";
+ } else {
+ print $client "error: ".($!+0)
+ ." tie(GDBM) Failed ".
+ "while attempting get\n";
+ }
}
# ------------------------------------------------------------------------ eget
} elsif ($userinput =~ /^eget/) {