[dconf/wip/reorg] engine: correct logic error in queue checking



commit 81b10351655304c51e7bacb695c20b8e916bcde6
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jul 5 23:40:58 2012 -0400

    engine: correct logic error in queue checking
    
    The logic used for checking for changes in the pending and in-flight
    queues was backwards meaning that the in-flight queue was only checked
    if a match was found in the pending queue.  We rather want the in-flight
    queue to be checked only if we have not found a match already.

 engine/dconf-engine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 75d39e0..d8362f3 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -530,7 +530,7 @@ dconf_engine_read (DConfEngine        *engine,
           /* Check the pending queue first because those were submitted
            * more recently.
            */
-          found_key = dconf_engine_find_key_in_queue (&engine->pending, key, &value) &&
+          found_key = dconf_engine_find_key_in_queue (&engine->pending, key, &value) ||
                       dconf_engine_find_key_in_queue (&engine->in_flight, key, &value);
 
           dconf_engine_unlock_queues (engine);



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