diff options
author | mischief <mischief@offblast.org> | 2014-06-25 22:06:29 -0700 |
---|---|---|
committer | mischief <mischief@offblast.org> | 2014-06-25 22:06:29 -0700 |
commit | a1dad874469ff664375e9165d41034a1ee92b505 (patch) | |
tree | d56a67792556f0aeb0917ac1921e6e981fd91d0e | |
parent | 072c45d4633d5f03e3b79f9c60c3655a6d4a1149 (diff) | |
download | plan9front-a1dad874469ff664375e9165d41034a1ee92b505.tar.xz |
upas/fs: disable imap mail fetch pipeline due to race
pipeline = 1 with a dovecot imap server causes FETCH and OK responses
get interleaved so some message bodies accidentally get merged together.
disabling it will make fetching mail over imap slower, but it works.
-rw-r--r-- | sys/src/cmd/upas/fs/imap4.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/src/cmd/upas/fs/imap4.c b/sys/src/cmd/upas/fs/imap4.c index 714a3e7d0..06e8fdd84 100644 --- a/sys/src/cmd/upas/fs/imap4.c +++ b/sys/src/cmd/upas/fs/imap4.c @@ -9,7 +9,18 @@ #pragma varargck type "Z" char* int doublequote(Fmt*); -int pipeline = 1; + +// if pipeline == 1 and upas/fs is used with dovecot, +// 9Xn OK responses sometimes come much later after FETCH responses, i.e. +// <- * 1 FETCH ... +// <- * 2 FETCH ... +// <- * 3 FETCH ... +// <- 9X5 OK Fetch completed. +// <- 9X6 OK Fetch completed. +// download 40: did not get message body +// <- 9X7 OK Fetch completed. +// causing multiple messages to turn into one in imap4.c:/^imap4resp. +int pipeline = 0; static char Eio[] = "i/o error"; |