[evolution-data-server/gnome-2-30] Queue non-folder specific jobs while waiting for SELECT to complete
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Queue non-folder specific jobs while waiting for SELECT to complete
- Date: Mon, 28 Jun 2010 19:35:52 +0000 (UTC)
commit 2658733763adbd9cf03d6f9a279c7b646cf975af
Author: David Woodhouse <David Woodhouse intel com>
Date: Wed Jun 23 23:04:01 2010 +0100
Queue non-folder specific jobs while waiting for SELECT to complete
Remove this TODO from the list...
(cherry picked from commit 2f2ba06d5bc8f799bc61d473963771ee58046384)
camel/providers/imapx/camel-imapx-server.c | 29 ++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 4 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 14e6c7e..ed814f8 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -869,11 +869,32 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
gint pri = -128;
c(printf("** Starting next command\n"));
- if (is->literal != NULL || is->select_pending != NULL) {
- c(if (is->select_pending)
- printf("* no, waiting for literal/pending select '%s'\n", is->select_pending->full_name));
+ if (is->literal) {
+ c(printf("* no; waiting for literal '%s'\n", is->literal->name));
+ return;
+ }
+
+ if (is->select_pending) {
+ c(printf("-- Checking job queue for non-folder jobs\n"));
+ ic = (CamelIMAPXCommand *)is->queue.head;
+ nc = ic->next;
+ while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
+ c(printf("-- %3d '%s'?\n", (gint)ic->pri, ic->name));
+ if (ic->select == NULL) {
+ c(printf("--> starting '%s'\n", ic->name));
+ pri = ic->pri;
+ camel_dlist_remove((CamelDListNode *)ic);
+ imapx_command_start(is, ic);
+ count++;
+ }
+ ic = nc;
+ nc = nc->next;
+ }
+
+ if (count)
+ return;
- /* TODO prolly start the store operations which do not require any folder to be selected */
+ c(printf("* no, waiting for pending select '%s'\n", camel_folder_get_full_name (is->select_pending)));
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]