[gvfs] afc: Fix mount failing after trusting device
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afc: Fix mount failing after trusting device
- Date: Thu, 9 Jun 2016 10:00:43 +0000 (UTC)
commit 8c8aa6a8f790b1db546fbc2e81c7127172d5e2bf
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 8 16:34:45 2016 +0200
afc: Fix mount failing after trusting device
After having trusted the device, if we are too quick at clicking the
"Try Again" button, the creation will fail with an unknown error. Try
again silently up to the maximum number of retries after a short sleep.
https://bugzilla.gnome.org/show_bug.cgi?id=767399
daemon/gvfsbackendafc.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 57d21a4..3da3caf 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -616,6 +616,14 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
break;
}
+ /* An unknown error? Let's try again without prompting */
+ if (lerr == LOCKDOWN_E_UNKNOWN_ERROR)
+ {
+ g_debug ("Got an unknown lockdown error, retrying after a short sleep\n");
+ g_usleep (G_USEC_PER_SEC);
+ continue;
+ }
+
if (lerr != LOCKDOWN_E_PASSWORD_PROTECTED &&
lerr != LOCKDOWN_E_PAIRING_DIALOG_RESPONSE_PENDING)
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]