fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]"Message delimiter found while scanning headers" bug analyzed

2002-06-04 06:16:05
Mikhail Zabaluev <mhz(_at_)altlinux(_dot_)org>:
But then, in fetch_messages():

          /* 
           * Read the message headers and ship them to the
           * output sink.  
           */
          err = readheaders(mailserver_socket, len, msgsizes[num-1],
                           ctl, num);
          if (err == PS_RETAINED)
              suppress_forward = retained = TRUE;
          else if (err == PS_TRANSIENT)
              suppress_delete = suppress_forward = TRUE;
          else if (err == PS_REFUSED)
              suppress_forward = TRUE;
#if 0
          /* 
           * readheaders does not read the body when it
           * hits a non-header. It has been recently
           * fixed to return PS_TRUNCATED (properly) when
           * that happens, but apparently fixing that bug
           * opened this one here (which looks like an 
           * inproper fix from some ancient thinko)
           */
          else if (err == PS_TRUNCATED)
              suppress_readbody = TRUE;
          else if (err)
              return(err);
#else
          else if (err && err != PS_TRUNCATED)
              return(err);
#endif

(eek, a switch() would probably be optimized better)

Why the suppress_readbody flag is itself suppressed here?
Can somebody unravel the sloppy code (you advocate for
open source with THIS?) for me?

You're not reading very carefully.  Look at the preprocessor directives.
-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>


<Prev in Thread] Current Thread [Next in Thread>