[Imap-uw] Problem: mail_fetchtext() incomplete result
david at crowdway.com
Sun Jul 19 11:20:04 PDT 2009
I wasn't aware of the single buffer for all mail_fetch***() functions,
but I'm converting the results to std::strings directly afterwards so
it doesn't affect the app.
Turning on debugging telemetry showed that the message is transmitted
truncated by the server. This is the Gmail IMAP server. I guess I'll
have to download the messages in parts and then glue them back
Thanks for your help!
On Sun, Jul 19, 2009 at 7:24 PM, Mark Crispin<mrc+uw at panda.com> wrote:
> Turn on debugging telemetry and you will see the IMAP protocol interactions
> via mm_dlog(). Is the data being truncated from the server? Note that
> mm_dlog() will not show the data in literals, but you will see the byte
> counts and that should indicate if you are getting truncated data.
> If the data is truncated from the server, that's where you need to persue
> your further investigations. If it's coming from the server OK, then there
> is some problem in how you are calling c-client.
> Are you aware that the buffer used by mail_fetchtext() is used by other
> functions? This means that you can only use the return data from a
> mail_fetch***() function until you call another mail_fetch****() function. A
> common mistake is to call mail_fetchheader() and then mail_fetchtext() and
> expect to use both pointers afterwards.
> In any case, be sure to verify that the server isn't doing this, especially
> if it is not one of the standard good ones such as UW/Panda, Cyrus, or
> -- Mark --
> Science does not emerge from voting, party politics, or public debate.
> Si vis pacem, para bellum.
If automobiles had followed the same development cycle as the
computer, a Rolls-Royce would today cost $100, get a million miles per
gallon, and explode once a year, killing everyone inside.
- Robert X. Cringely
More information about the Imap-uw