[evolution] Simplify code at shell_trust_prompt_done_cb() a bit



commit e4f2662e4ba224bf9d89793e3fdd0dfa8681f88b
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 4 12:38:02 2015 +0100

    Simplify code at shell_trust_prompt_done_cb() a bit
    
    The e_source_invoke_authenticate() accepts NULL credentials, thus use
    them instead of creating and freeing effectively empty structure.

 shell/e-shell.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index d908e6f..40e9832 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -687,7 +687,6 @@ shell_trust_prompt_done_cb (GObject *source_object,
        ESource *source;
        EShell *shell = user_data;
        ETrustPromptResponse response = E_TRUST_PROMPT_RESPONSE_UNKNOWN;
-       ENamedParameters *credentials;
        GError *error = NULL;
 
        g_return_if_fail (E_IS_SOURCE (source_object));
@@ -723,12 +722,9 @@ shell_trust_prompt_done_cb (GObject *source_object,
        /* If a credentials prompt is required, then it'll be shown immediately. */
        e_credentials_prompter_set_auto_prompt_disabled_for (shell->priv->credentials_prompter, source, 
FALSE);
 
-       credentials = e_named_parameters_new ();
-
-       e_source_invoke_authenticate (source, credentials, shell->priv->cancellable,
+       /* NULL credentials to retry with those used the last time */
+       e_source_invoke_authenticate (source, NULL, shell->priv->cancellable,
                shell_source_invoke_authenticate_cb, shell);
-
-       e_named_parameters_free (credentials);
 }
 
 static void


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