aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-09-25 15:19:47 +0800
committerMilan Crha <mcrha@redhat.com>2013-09-25 15:35:59 +0800
commit59fbba333c78f8d30bcef35c802e1b99636d8f4d (patch)
tree546a3651b0818a5e31e67680212896f95c93c202
parent21ae7283fb24f2cf1ea0990a900fafb165dc0ddf (diff)
downloadgsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar.gz
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar.bz2
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar.lz
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar.xz
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.tar.zst
gsoc2013-evolution-59fbba333c78f8d30bcef35c802e1b99636d8f4d.zip
Add debugging for formatter requests
With CAMEL_DEBUG=emformat:requests the evolution prints a debug messages about requests being processed when formatting messages.
-rw-r--r--mail/e-http-request.c5
-rw-r--r--mail/e-mail-request.c21
2 files changed, 23 insertions, 3 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index a4a35567ed..996a993804 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 e6338ee744..bfbedc35a1 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);