diff options
author | Brendan Cully <brendan@kublai.com> | 2008-08-25 00:52:17 -0700 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2008-08-25 00:52:17 -0700 |
commit | caf2426396dca01cd3587f8a54c02804c2a29501 (patch) | |
tree | f441352571ca8b9295b6cc413efd67c63874a54a /imap/util.c | |
parent | 2fa9084fb0b1bac912afd51e5e154fadc863c6e1 (diff) |
Introduce $imap_pipeline_depth.
This lets users control the number of commands that mutt will queue up
before sending them to the server. Setting this to 0 disables
pipelining, which should close #2892.
Diffstat (limited to 'imap/util.c')
-rw-r--r-- | imap/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/imap/util.c b/imap/util.c index 785d8f3b..eb3a1a16 100644 --- a/imap/util.c +++ b/imap/util.c @@ -354,6 +354,13 @@ IMAP_DATA* imap_new_idata (void) if (!(idata->cmdbuf = mutt_buffer_init (NULL))) FREE (&idata); + idata->cmdslots = ImapPipelineDepth + 2; + if (!(idata->cmds = safe_calloc(idata->cmdslots, sizeof(*idata->cmds)))) + { + mutt_buffer_free(&idata->cmdbuf); + FREE (&idata); + } + return idata; } @@ -369,6 +376,7 @@ void imap_free_idata (IMAP_DATA** idata) mutt_buffer_free(&(*idata)->cmdbuf); FREE (&(*idata)->buf); mutt_bcache_close (&(*idata)->bcache); + FREE (&(*idata)->cmds); FREE (idata); /* __FREE_CHECKED__ */ } |