From: unobe@cpan.org
To: 9front@9front.org
Subject: [9front] patch for imap when imap fails
Date: Sat, 17 Apr 2021 16:42:11 -0700 [thread overview]
Message-ID: <300907D4A2559E449892D14BF1AB6348@smtp.pobox.com> (raw)
changeset: 8411:19f6a88ea241
branch: mbp-2011
user: Romano <unobe@cpan.org>
date: Sat Apr 17 14:35:21 2021 -0700
files: sys/src/cmd/upas/fs/imap.c
description:
When an imap fetch fails, it's helpful at times to know the underlying
cause. This provides more details by providing the underlying error
message.
diff -r e67425888043 -r 19f6a88ea241 sys/src/cmd/upas/fs/imap.c
--- a/sys/src/cmd/upas/fs/imap.c Sat Apr 17 14:34:04 2021 -0700
+++ b/sys/src/cmd/upas/fs/imap.c Sat Apr 17 14:35:21 2021 -0700
@@ -865,14 +865,16 @@
imap4fetch(Mailbox *mb, Message *m, uvlong o, ulong l)
{
Imap *imap;
+ char *resp;
imap = mb->aux;
if(imap->flags & Fgmail)
l = gmaildiscount(m, o, l);
idprint(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)\n", (ulong)m->imapuid, o, l);
imap4cmd(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)", (ulong)m->imapuid, o, l);
- if(!isokay(imap4resp0(imap, mb, m))){
- eprint("imap: imap fetch failed\n");
+ resp = imap4resp0(imap, mb, m);
+ if(!isokay(resp)){
+ eprint("imap: imap fetch failed: %s\n", resp);
return -1;
}
return 0;
reply other threads:[~2021-04-18 1:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=300907D4A2559E449892D14BF1AB6348@smtp.pobox.com \
--to=unobe@cpan.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).