diff options
author | Not Zed <NotZed@Ximian.com> | 2003-09-16 07:21:16 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-09-16 07:21:16 +0800 |
commit | cf2b82e85864db8c0bfebceb84fd230691adc3f4 (patch) | |
tree | fbbcd7e3e2cb21afb724d6a76e449a43c22408bb /camel/providers/imapp/camel-imapp-engine.c | |
parent | 99274a95701e007c22cbfc3f7d42a123b0464ea4 (diff) | |
download | gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar.gz gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar.bz2 gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar.lz gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar.xz gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.tar.zst gsoc2013-evolution-cf2b82e85864db8c0bfebceb84fd230691adc3f4.zip |
removed dead code.
2003-09-15 Not Zed <NotZed@Ximian.com>
* providers/imapp/camel-imapp-store.c (store_resp_list)
(imap_login, try_sasl, imap_try_authenticate): removed dead code.
* providers/imapp/camel-imapp-stream.c: return -1 if stream not
set.
* providers/imapp/camel-imapp-engine.c (iterate_completion): put
done request on the done queue, so all requests are always
somewhere.
(camel_imapp_engine_command_free): just spit warnings of active
messages being freed, but abort if the item isn't in any list.
Also remove the node from its list before going on.
(iterate_untagged, iterate_continuation, iterate_completion):
staticifiy.
* providers/imapp/camel-imapp-provider.c
(camel_imapp_module_init): move camel_exception_setup call here.
* providers/imapp/camel-imapp-driver.c
(camel_imapp_driver_get_type): remove execption setup here, it
isn't early enough.
(camel_imapp_driver_list): handle exceptions.
svn path=/trunk/; revision=22583
Diffstat (limited to 'camel/providers/imapp/camel-imapp-engine.c')
-rw-r--r-- | camel/providers/imapp/camel-imapp-engine.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/camel/providers/imapp/camel-imapp-engine.c b/camel/providers/imapp/camel-imapp-engine.c index f6cfcbf86c..df14903c5a 100644 --- a/camel/providers/imapp/camel-imapp-engine.c +++ b/camel/providers/imapp/camel-imapp-engine.c @@ -43,6 +43,7 @@ object_init(CamelIMAPPEngine *ie, CamelIMAPPEngineClass *ieclass) ie->handlers = g_hash_table_new(g_str_hash, g_str_equal); e_dlist_init(&ie->active); e_dlist_init(&ie->queue); + e_dlist_init(&ie->done); ie->tagprefix = ieclass->tagprefix; ieclass->tagprefix++; @@ -339,7 +340,7 @@ camel_imapp_engine_skip(CamelIMAPPEngine *imap) } /* handle any untagged responses */ -int +static int iterate_untagged(CamelIMAPPEngine *imap) { unsigned int id, len; @@ -535,6 +536,7 @@ iterate_completion(CamelIMAPPEngine *imap, unsigned char *token) printf("%p: removing command from qwueue, we were at '%s'\n", ic, ic->current->data); printf("%p: removing command\n", ic); e_dlist_remove((EDListNode *)ic); + e_dlist_addtail(&imap->done, (EDListNode *)ic); if (imap->literal == ic) imap->literal = NULL; ic->status = imap_parse_status(imap->stream); @@ -559,6 +561,7 @@ iterate_completion(CamelIMAPPEngine *imap, unsigned char *token) ic = imap->literal; /* set the command complete with a failure code? */ e_dlist_remove((EDListNode *)ic); + e_dlist_addtail(&imap->done, (EDListNode *)ic); imap->literal = NULL; } @@ -660,21 +663,42 @@ camel_imapp_engine_command_free (CamelIMAPPEngine *imap, CamelIMAPPCommand *ic) /* maybe we should just have another queue to keep them? */ { CamelIMAPPCommand *iw; + int found = 0; iw = (CamelIMAPPCommand *)imap->active.head; while (iw->next) { - if (iw == ic) - abort(); + if (iw == ic) { + found = 1; + g_warning("command '%s' still in active queue", iw->name); + break; + } iw = iw->next; } iw = (CamelIMAPPCommand *)imap->queue.head; while (iw->next) { - if (iw == ic) - abort(); + if (iw == ic) { + found = 1; + g_warning("command '%s' still in waiting queue", iw->name); + break; + } + iw = iw->next; + } + iw = (CamelIMAPPCommand *)imap->done.head; + while (iw->next) { + if (iw == ic) { + found = 1; + break; + } iw = iw->next; } + if (!found) { + g_warning("command '%s' not found anywhere", ic->name); + abort(); + } } + e_dlist_remove((EDListNode *)ic); + if (ic->mem) camel_object_unref((CamelObject *)ic->mem); imap_free_status(ic->status); |