[nautilus] windows-slot: Handle CONNECTION_REFUSED error message



commit eeb0e92c8b57245d1d5c55210400970bd099038a
Author: Athira Selvam <thisisathi gmail com>
Date:   Wed Feb 20 00:33:03 2019 +0530

    windows-slot: Handle CONNECTION_REFUSED error message
    
    When trying to connect to a machine in which server application is not
    installed or is inactive, nautilus shows a "Unhandled message error:
    Connection refused by server" message.
    
    The message is unhelpful, and there is no reason not to handle this case.
    
    So, handle the error and the give possible reasons for it.
    
    Closes https://gitlab.gnome.org/GNOME/nautilus/issues/855

 src/nautilus-window-slot.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index c4d2fe1c9..ee15f4c68 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1745,6 +1745,15 @@ nautilus_window_slot_display_view_selection_failure (NautilusWindow *window,
             }
             break;
 
+            case G_IO_ERROR_CONNECTION_REFUSED:
+            {
+                /* This case can be hit when server application is not installed
+                 * or is inactive in the system user is trying to connect to.
+                 */
+                detail_message = g_strdup (_("The server has refused the connection. Typically this means 
that the firewall is blocking access or that the remote service is not running."));
+            }
+            break;
+
             case G_IO_ERROR_CANCELLED:
             case G_IO_ERROR_FAILED_HANDLED:
             {


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