diff options
author | Dan Winship <danw@src.gnome.org> | 2000-09-16 02:26:36 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-09-16 02:26:36 +0800 |
commit | e2c2e5b55a51ac34b4089c000898c4a70b1a01e2 (patch) | |
tree | 43e30e6663d5f6592d7d1f8dfc1a399b729cfceb /camel/camel-remote-store.c | |
parent | b10192b1e0b6d86463237605bf0fc0cb865ed122 (diff) | |
download | gsoc2013-evolution-e2c2e5b55a51ac34b4089c000898c4a70b1a01e2.tar.gz gsoc2013-evolution-e2c2e5b55a51ac34b4089c000898c4a70b1a01e2.tar.zst gsoc2013-evolution-e2c2e5b55a51ac34b4089c000898c4a70b1a01e2.zip |
Set camel_verbose_debug to TRUE if CAMEL_VERBOSE_DEBUG is set in the
* camel.c (camel_init): Set camel_verbose_debug to TRUE if
CAMEL_VERBOSE_DEBUG is set in the environment.
* camel-remote-store.c (remote_send_line, remote_recv_line): only
log if camel_verbose_debug is TRUE.
svn path=/trunk/; revision=5462
Diffstat (limited to 'camel/camel-remote-store.c')
-rw-r--r-- | camel/camel-remote-store.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c index afbd3a71ca..16387c1c3f 100644 --- a/camel/camel-remote-store.c +++ b/camel/camel-remote-store.c @@ -48,6 +48,9 @@ #include "string-utils.h" #define d(x) x +#if d(!)0 +extern gboolean camel_verbose_debug; +#endif #define CSRVC(obj) (CAMEL_SERVICE_CLASS (CAMEL_OBJECT_GET_CLASS (obj))) #define CSTRC(obj) (CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (obj))) @@ -322,12 +325,14 @@ remote_send_string (CamelRemoteStore *store, CamelException *ex, char *fmt, va_l cmdbuf = g_strdup_vprintf (fmt, ap); #if d(!)0 - if (strncmp (cmdbuf, "PASS ", 5) == 0) - fprintf (stderr, "sending : PASS xxxx\n"); - else if (strstr (cmdbuf, "LOGIN \"")) - fprintf (stderr, "sending : ---- LOGIN \"xxxx\" \"xxxx\"\n"); - else - fprintf (stderr, "sending : %s", cmdbuf); + if (camel_verbose_debug) { + if (strncmp (cmdbuf, "PASS ", 5) == 0) + fprintf (stderr, "sending : PASS xxxx\n"); + else if (strstr (cmdbuf, "LOGIN \"")) + fprintf (stderr, "sending : ---- LOGIN \"xxxx\" \"xxxx\"\n"); + else + fprintf (stderr, "sending : %s", cmdbuf); + } #endif if (camel_stream_printf (store->ostream, "%s", cmdbuf) == -1) { @@ -461,8 +466,11 @@ remote_recv_line (CamelRemoteStore *store, char **dest, CamelException *ex) camel_exception_clear (&dex); return -1; } - - d(fprintf (stderr, "received: %s\n", *dest)); + +#if d(!)0 + if (camel_verbose_debug) + fprintf (stderr, "received: %s\n", *dest); +#endif return 0; } |