[evolution-data-server] [IMAPx] Remove redundant CAMEL_IMAPX_ERROR_TRY_RECONNECT error code



commit 84016039782020a56828b5155d83b7ccbacd735b
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 1 16:08:01 2015 +0200

    [IMAPx] Remove redundant CAMEL_IMAPX_ERROR_TRY_RECONNECT error code
    
    The right error code is CAMEL_IMAPX_SERVER_ERROR_TRY_RECONNECT, no need
    to duplicate it in the code. Furthermore, the error could make it into
    the UI, which was not intended to happen.

 camel/providers/imapx/camel-imapx-conn-manager.c |    1 -
 camel/providers/imapx/camel-imapx-input-stream.h |    3 +--
 camel/providers/imapx/camel-imapx-job.c          |    3 ---
 camel/providers/imapx/camel-imapx-server.c       |    2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c 
b/camel/providers/imapx/camel-imapx-conn-manager.c
index 15002e4..49598d9 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -1017,7 +1017,6 @@ camel_imapx_conn_manager_run_job_sync (CamelIMAPXConnManager *conn_man,
                                imapx_conn_manager_remove_info (conn_man, cinfo);
 
                                if (!local_error ||
-                                   g_error_matches (local_error, CAMEL_IMAPX_ERROR, 
CAMEL_IMAPX_ERROR_TRY_RECONNECT) ||
                                    g_error_matches (local_error, G_TLS_ERROR, G_TLS_ERROR_MISC) ||
                                    g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CLOSED)) {
                                        GError *tmp = local_error;
diff --git a/camel/providers/imapx/camel-imapx-input-stream.h 
b/camel/providers/imapx/camel-imapx-input-stream.h
index af42369..e379a3a 100644
--- a/camel/providers/imapx/camel-imapx-input-stream.h
+++ b/camel/providers/imapx/camel-imapx-input-stream.h
@@ -50,8 +50,7 @@ typedef struct _CamelIMAPXInputStreamPrivate CamelIMAPXInputStreamPrivate;
 
 typedef enum {
        CAMEL_IMAPX_ERROR_SERVER_RESPONSE_MALFORMED = 1,
-       CAMEL_IMAPX_ERROR_IGNORE, /* may ignore such errors */
-       CAMEL_IMAPX_ERROR_TRY_RECONNECT
+       CAMEL_IMAPX_ERROR_IGNORE /* may ignore such errors */
 } CamelIMAPXError;
 
 typedef enum {
diff --git a/camel/providers/imapx/camel-imapx-job.c b/camel/providers/imapx/camel-imapx-job.c
index 7f944cd..635ceaf 100644
--- a/camel/providers/imapx/camel-imapx-job.c
+++ b/camel/providers/imapx/camel-imapx-job.c
@@ -482,9 +482,6 @@ camel_imapx_job_run_sync (CamelIMAPXJob *job,
                        g_cancellable_disconnect (cancellable, cancelled_handler_id);
        }
 
-       if (!g_error_matches (local_error, CAMEL_IMAPX_SERVER_ERROR, CAMEL_IMAPX_SERVER_ERROR_TRY_RECONNECT))
-               camel_imapx_job_done (job);
-
        if (local_error)
                g_propagate_error (error, local_error);
 
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 6def010..5595d20 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3662,7 +3662,7 @@ camel_imapx_server_process_command_sync (CamelIMAPXServer *is,
 
        if (output_stream == NULL) {
                local_error = g_error_new_literal (
-                       CAMEL_IMAPX_ERROR, CAMEL_IMAPX_ERROR_TRY_RECONNECT,
+                       CAMEL_IMAPX_SERVER_ERROR, CAMEL_IMAPX_SERVER_ERROR_TRY_RECONNECT,
                        _("Cannot issue command, no stream available"));
                goto exit;
        }


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