[gvfs/gnome-3-20] afc: Fix mount failing after trusting device



commit eef39baec095f59030ad5a4a4f936eb70c3843c5
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 f6a147d..2d8da14 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -597,6 +597,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]