Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  25 Nov 2004, chris pearson, Forum, use of assert in mhttpd 
    Reply  14 Dec 2004, Konstantin Olchanski, Forum, use of assert in mhttpd 
Message ID: 176     Entry time: 25 Nov 2004     Reply to this: 177
Author: chris pearson 
Topic: Forum 
Subject: use of assert in mhttpd 
   We've had mhttpd aborting regularly since upgrading from midas-1.9.3.  This
happens during elog queries, and is due to an elog file that was incorrectly
modified by hand.  The modification to the file occurred 6 months ago.
   el_retrieve(midas.c:15683) now has several assert statements, one of which
aborts the program on reading the bad entry.

   Why is assert used, instead of an error return from the function (if
necessary), and maybe an error message in the log file?  Assert statements are
often removed, using NDEBUG, for normal use.


   The problem elog entry had one character removed, so end-of-file came before
the end of the message.  This could probably occur without the file being
altered, if the disk containing the elog fills.
ELOG V3.1.4-2e1708b5