[folks] bluez: Ensure to yield until OBEX transfers have completed



commit 5280f3363eb1abd782d25dfdcad33f01958bdb1c
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Aug 8 15:13:53 2014 +0100

    bluez: Ensure to yield until OBEX transfers have completed
    
    It was possible for the code to not yield on an in-progress transfer if
    the transfer_status was initially non-null (e.g. ‘queued’). This change
    ensures that the transfer is yielded on if the status isn’t ‘complete’
    or ‘error’. The yield callback is only invoked once the status has
    changed to ‘complete’ or ‘error’, so the code is now guaranteed to not
    hit the assert_not_reached() call.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733891

 backends/bluez/bluez-persona-store.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/backends/bluez/bluez-persona-store.vala b/backends/bluez/bluez-persona-store.vala
index e51be74..01ec6a3 100644
--- a/backends/bluez/bluez-persona-store.vala
+++ b/backends/bluez/bluez-persona-store.vala
@@ -650,7 +650,7 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
 
           /* Yield until the above signal handler is called with a ‘success’ or
            * ‘error’ status. */
-          if (transfer_status == null)
+          if (transfer_status != "complete" && transfer_status != "error")
             {
               has_yielded = true;
               yield;


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