[Orca-users] orcollator dying with long lines in squid log

Paul Haldane Paul.Haldane at newcastle.ac.uk
Tue Nov 2 08:26:24 PST 1999


From: Paul Haldane <Paul.Haldane at newcastle.ac.uk>


Hi - I've been looking in more detail at my problem with orcollator (1.20)
and long lines in the squid access.log file (previous mentioned on the
orcahelp list).  

My first thought was to just skip lines in the log file that were too
long (testing the length of the string passed to accesslog()).  I now
realise that's not going to work as this string is the result of an fgets
and so will never be longer than BUFSIZ-1.  

The real problem is that when dealing with a very long line (longer than
BUFSIZ-1) the first fgets (and call to accesslog) deals with the first
BUFSIZ-1 characters and subsequent calls deal with the rest which is
unlikely to be a properly formed access.log line.

My suggested solution is to add more checks to accesslog() - checking each
return value from strtok() to see if it's NULL and returning from the
function if it is.

Paul

-- 
Paul Haldane
Computing Service
University of Newcastle

--------------------------- ONElist Sponsor ----------------------------

    GRAB THE GATOR! FREE SOFTWARE DOES ALL THE TYPING FOR YOU!
Tired of filling out forms and remembering passwords? Gator fills in
forms and passwords with just one click! Comes with $50 in free coupons!
  <a href=" http://clickme.onelist.com/ad/gator4 ">Click Here</a>

------------------------------------------------------------------------



More information about the Orca-users mailing list