On Sun, Apr 06, 2003 at 12:47:48PM +0200, Andreas Aardal Hanssen wrote:
> The parser is hand written - there are some generic functions in
> librecursivedescent, but most of the work is done by the individual
> operators. They all implement their own parse routines for the commands
> they serve.

Okay, good.  I just didn't want to make changes that would get tossed out or
were hard to patch in.

> You'd just have to find all calls to readChar and see if the conversion to
> returning char is safe everywhere. Note that in SSLEnabledIO, readChar can
> return non-char values because of renegotiation (wonder how imap-front
> handles this), in which case a new call to readChar must be made. This is
> done in authenticate.cc when SSL data is tunneled, asynchronously.

Yes, that's what I've been doing. In every case, it was simply being converted
to char locally.  With it throwing on EOF, the code that double-checks for
EOF in a few places was redundant.  The only hinky part is the retry's
you mentioned.  I searched the code and found no instances where retry
wasn't desired and so I think throwing an exception is an acceptable
way to deal with an error on a failed retry.  Especially since the caller
will know that they are calling with retry=false and therefore might
get an EOF exception or a retry exception.

The only places that I found the -2 being handled is in the authenticate.cc
you refer to.  Even then, though, it's handled by an empty block and it
doesn't pass retry=false so it would never get it.

> Since readChar's semantics apart from that are "get a character, or catch 
> an EOF inputException", I guess that -2 value should trigger an exception 
> too.
>
> But have you managed to reproduce the problem? ;)

I've had trouble uploading large numbers of messages in mozilla since 
before version 1.0.  That's what originally sparked me to work on the
IO code.  I've since concluded that Mozilla is a poor MUA when it comes
to IMAP and certain operations.  LSUB is just a pain.

But anyway, most of my changes are focusing on helping clean up old code
so that you can focus on the new features.

C=)

-- 
--------------------------------------------------------------------------
     Better the hard truth than the comforting fantasy. -- Carl Sagan
--------------------------------------------------------------------------
Caskey <caskey*technocage.com>       ///                   TechnoCage Inc.
--------------------------------------------------------------------------
 A presumption on your part does not constitute an obligation on my part.

Reply via email to