diff options
author | Milan Crha <mcrha@redhat.com> | 2015-09-03 14:47:46 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2015-09-03 14:47:46 +0200 |
commit | 8f6ac926f2f927d0e687bec07fa67e4d96c518f1 (patch) | |
tree | d35c717dbc217edbcae6aa1bc1c0c0202b32e3df | |
parent | b5df9b2abe8a2f76176292dab853070946b7fdf6 (diff) | |
download | evolution-data-server-8f6ac926f2f927d0e687bec07fa67e4d96c518f1.tar.gz |
[IMAPx] Better runtime warning when running command on top of another
The CamelIMAPXServer should run only one command at one time, it's
an error to issue two commands at the same time, thus rather than
just printing an issue about the current_command not being NULL print
what job is processing and which is to be processed, for better debugging.
-rw-r--r-- | camel/providers/imapx/camel-imapx-command.h | 2 | ||||
-rw-r--r-- | camel/providers/imapx/camel-imapx-server.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/camel/providers/imapx/camel-imapx-command.h b/camel/providers/imapx/camel-imapx-command.h index b8e56d44f..836ac45da 100644 --- a/camel/providers/imapx/camel-imapx-command.h +++ b/camel/providers/imapx/camel-imapx-command.h @@ -60,8 +60,6 @@ struct _CamelIMAPXCommandPart { gpointer ob; }; - - struct _CamelIMAPXCommand { struct _CamelIMAPXServer *is; gint pri; diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c index c9f17d5e4..c40d8affa 100644 --- a/camel/providers/imapx/camel-imapx-server.c +++ b/camel/providers/imapx/camel-imapx-server.c @@ -3636,7 +3636,11 @@ camel_imapx_server_process_command_sync (CamelIMAPXServer *is, COMMAND_LOCK (is); - g_warn_if_fail (is->priv->current_command == NULL); + if (is->priv->current_command != NULL) { + g_warning ("%s: Starting command '%s' while still processing '%s'", G_STRFUNC, + camel_imapx_job_get_kind_name (ic->job_kind), + camel_imapx_job_get_kind_name (is->priv->current_command->job_kind)); + } c (is->priv->tagprefix, "%s: %p ~> %p\n", G_STRFUNC, is->priv->current_command, ic); |