diff options
author | Ondrej Holy <oholy@redhat.com> | 2015-02-27 10:22:22 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-03-04 14:18:55 +0100 |
commit | 8fdf64272ec47315cdd3e12d1aa628ad3bb837bc (patch) | |
tree | ad45b14f931ca9ebc82f570aa4c33ba83d66cda6 /daemon/gvfsafpconnection.c | |
parent | bccf6a229448ed944963095b673adc5f13649b12 (diff) | |
download | gvfs-8fdf64272ec47315cdd3e12d1aa628ad3bb837bc.tar.gz |
afp: exit silently if connection closed
Commit c15ec62 introduced exit for G_IO_ERROR_CLOSED, however we
should check also for G_IO_ERROR_CONNECTION_CLOSED.
Bump GLib dependency to 2.43.2, where the error was introduced.
https://bugzilla.gnome.org/show_bug.cgi?id=710490
Diffstat (limited to 'daemon/gvfsafpconnection.c')
-rw-r--r-- | daemon/gvfsafpconnection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gvfsafpconnection.c b/daemon/gvfsafpconnection.c index 2f2958d7..c8ccad72 100644 --- a/daemon/gvfsafpconnection.c +++ b/daemon/gvfsafpconnection.c @@ -1074,7 +1074,8 @@ read_data_cb (GObject *object, GAsyncResult *res, gpointer user_data) result = read_all_finish (input, res, NULL, &err); if (!result) { - if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CLOSED)) + if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CLOSED) || + g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) { g_message (_("Host closed connection")); exit(0); @@ -1115,7 +1116,8 @@ read_dsi_header_cb (GObject *object, GAsyncResult *res, gpointer user_data) result = read_all_finish (input, res, NULL, &err); if (!result) { - if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CLOSED)) + if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CLOSED) || + g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) { g_message (_("Host closed connection")); exit(0); |