[evolution-data-server] CamelGpgContext: Fix broken debugging statements.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelGpgContext: Fix broken debugging statements.
- Date: Fri, 6 Dec 2013 17:08:20 +0000 (UTC)
commit 44dec69c58b5046aa415604fa2510c937ddcac29
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Dec 6 12:05:50 2013 -0500
CamelGpgContext: Fix broken debugging statements.
Camel likes to use this debugging idiom:
#define d(x)
and then wraps debugging statements like so:
d (printf (...));
One is supposed to enable debugging by changing the macro to:
#define d(x) x
This idiom makes debugging statements hard to grep for, but moreover
they don't get compiled regularly and so they tend to bit rot.
As was the case in CamelGpgContext, where the debugging statements
didn't build because they were still written for Camel's old home-
grown object system.
camel/camel-gpg-context.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 7878cb8..36b6937 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -1667,10 +1667,11 @@ gpg_sign_sync (CamelCipherContext *context,
CamelStream *out;
name = g_strdup_printf ("camel-gpg.%d.sign-data", logid++);
- out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (
+ name, O_CREAT | O_TRUNC | O_WRONLY, 0666, NULL);
if (out) {
printf ("Writing gpg signing data to '%s'\n", name);
- camel_stream_write_to_stream (istream, out);
+ camel_stream_write_to_stream (istream, out, NULL, NULL);
g_seekable_seek (
G_SEEKABLE (istream), 0,
G_SEEK_SET, NULL, NULL);
@@ -1837,10 +1838,11 @@ gpg_verify_sync (CamelCipherContext *context,
CamelStream *out;
name = g_strdup_printf ("camel-gpg.%d.verify.data", logid);
- out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (
+ name, O_CREAT | O_TRUNC | O_WRONLY, 0666, NULL);
if (out) {
printf ("Writing gpg verify data to '%s'\n", name);
- camel_stream_write_to_stream (istream, out);
+ camel_stream_write_to_stream (istream, out, NULL, NULL);
g_seekable_seek (
G_SEEKABLE (istream),
0, G_SEEK_SET, NULL, NULL);
@@ -1851,10 +1853,13 @@ gpg_verify_sync (CamelCipherContext *context,
if (sigpart) {
name = g_strdup_printf ("camel-gpg.%d.verify.signature", logid++);
- out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (
+ name, O_CREAT | O_TRUNC | O_WRONLY, 0666, NULL);
if (out) {
printf ("Writing gpg verify signature to '%s'\n", name);
- camel_data_wrapper_write_to_stream ((CamelDataWrapper *) sigpart, out);
+ camel_data_wrapper_write_to_stream_sync (
+ CAMEL_DATA_WRAPPER (sigpart),
+ out, NULL, NULL);
g_object_unref (out);
}
g_free (name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]