[evolution-mapi/gnome-3-6] Allow debugging of an account Authenticate process



commit da2e53f8a04c85da848b1ea8331b953b70fdfa47
Author: Milan Crha <mcrha redhat com>
Date:   Mon Feb 25 16:22:48 2013 +0100

    Allow debugging of an account Authenticate process
    
    Debugging was enabled only for the profile's load mapi contexts, not for all,
    thus for example accounts' validation didn't print debug info on console.
    Setting debugging for each mapi context makes this work better.

 src/libexchangemapi/e-mapi-connection.c |    8 --------
 src/libexchangemapi/e-mapi-utils.c      |    7 +++++++
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/libexchangemapi/e-mapi-connection.c b/src/libexchangemapi/e-mapi-connection.c
index 7fa0aaf..6e64a2f 100644
--- a/src/libexchangemapi/e-mapi-connection.c
+++ b/src/libexchangemapi/e-mapi-connection.c
@@ -6738,7 +6738,6 @@ mapi_profile_load (ESourceRegistry *registry,
        enum MAPISTATUS ms = MAPI_E_SUCCESS;
        struct mapi_session *session = NULL;
        struct mapi_profile *profile;
-       guint32 debug_log_level = 0;
 
        e_return_val_mapi_error_if_fail (mapi_ctx != NULL, MAPI_E_INVALID_PARAMETER, NULL);
        e_return_val_mapi_error_if_fail (profname != NULL, MAPI_E_INVALID_PARAMETER, NULL);
@@ -6748,13 +6747,6 @@ mapi_profile_load (ESourceRegistry *registry,
 
        e_mapi_debug_print("%s: Entering %s ", G_STRLOC, G_STRFUNC);
 
-       /* Initialize libmapi logger*/
-       if (g_getenv ("LIBMAPI_DEBUG")) {
-               debug_log_level = atoi (g_getenv ("LIBMAPI_DEBUG"));
-               SetMAPIDumpData (mapi_ctx, TRUE);
-               SetMAPIDebugLevel (mapi_ctx, debug_log_level);
-       }
-
        profile = talloc_zero (mapi_ctx, struct mapi_profile);
        if (MAPI_E_SUCCESS == OpenProfile (mapi_ctx, profile, profname, NULL)) {
                if (!can_reach_mapi_server (profile->server, cancellable, perror)) {
diff --git a/src/libexchangemapi/e-mapi-utils.c b/src/libexchangemapi/e-mapi-utils.c
index a8e5f03..994e2a3 100644
--- a/src/libexchangemapi/e-mapi-utils.c
+++ b/src/libexchangemapi/e-mapi-utils.c
@@ -1117,6 +1117,13 @@ e_mapi_utils_create_mapi_context (struct mapi_context **mapi_ctx, GError **perro
 
        g_free (profpath);
 
+       /* Initialize libmapi logger */
+       if (*mapi_ctx && g_getenv ("LIBMAPI_DEBUG")) {
+               guint32 debug_log_level = atoi (g_getenv ("LIBMAPI_DEBUG"));
+               SetMAPIDumpData (*mapi_ctx, TRUE);
+               SetMAPIDebugLevel (*mapi_ctx, debug_log_level);
+       }
+
        e_mapi_utils_global_unlock ();
 
        return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]