[evolution] Add debugging for formatter requests
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Add debugging for formatter requests
- Date: Wed, 25 Sep 2013 07:21:42 +0000 (UTC)
commit 6d96953703d24d146cdec1c25a97c07cd29c2c24
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 25 09:19:47 2013 +0200
Add debugging for formatter requests
With CAMEL_DEBUG=emformat:requests the evolution prints a debug messages
about requests being processed when formatting messages.
mail/e-http-request.c | 5 +++++
mail/e-mail-request.c | 21 ++++++++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index a4a3556..996a993 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -188,6 +188,11 @@ handle_http_request (GSimpleAsyncResult *res,
evo_uri = soup_uri_to_string (soup_uri, FALSE);
+ if (camel_debug_start ("emformat:requests")) {
+ printf ("%s: looking for '%s'\n", G_STRFUNC, evo_uri);
+ camel_debug_end ();
+ }
+
/* Remove the "evo-" prefix from scheme */
uri_len = strlen (evo_uri);
uri = NULL;
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
index e6338ee..bfbedc3 100644
--- a/mail/e-mail-request.c
+++ b/mail/e-mail-request.c
@@ -82,7 +82,14 @@ handle_mail_request (GSimpleAsyncResult *simple,
registry = e_mail_part_list_get_registry ();
part_list = camel_object_bag_get (registry, request->priv->uri_base);
- g_return_if_fail (part_list != NULL);
+
+ if (camel_debug_start ("emformat:requests")) {
+ printf ("%s: found part-list %p for full_uri '%s'\n", G_STRFUNC, part_list,
request->priv->full_uri);
+ camel_debug_end ();
+ }
+
+ if (!part_list)
+ return;
val = g_hash_table_lookup (
request->priv->uri_query, "headers_collapsed");
@@ -131,10 +138,17 @@ handle_mail_request (GSimpleAsyncResult *simple,
part_id = soup_uri_decode (val);
part = e_mail_part_list_ref_part (part_list, part_id);
+ if (!part) {
+ if (camel_debug_start ("emformat:requests")) {
+ printf ("%s: part with id '%s' not found\n", G_STRFUNC, part_id);
+ camel_debug_end ();
+ }
+
+ g_free (part_id);
+ goto no_part;
+ }
g_free (part_id);
- g_return_if_fail (part != NULL);
-
mime_type = g_hash_table_lookup (
request->priv->uri_query, "mime_type");
@@ -171,6 +185,7 @@ handle_mail_request (GSimpleAsyncResult *simple,
context.flags, context.mode, cancellable);
}
+ no_part:
g_clear_object (&output_stream);
g_clear_object (&context.part_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]