[glib] GDBusConnection: don't pass boolean > 1 to _g_dbus_worker_new



commit c4a11858cfb098ccc25d35dd7f5461c51b7f6ad3
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Tue Nov 22 12:39:54 2011 +0000

    GDBusConnection: don't pass boolean > 1 to _g_dbus_worker_new
    
    This happens to work at the moment (because GDBusWorker.frozen is a
    gboolean and not just a 1-bit bitfield), but isn't right: the gboolean
    ends up with values 0 or G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING
    (which is more than 1).
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=664558
    Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
    Reviewed-by: David Zeuthen <davidz redhat com>

 gio/gdbusconnection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index a6cf3df..b214fff 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -2616,7 +2616,7 @@ initable_init (GInitable     *initable,
 
   connection->worker = _g_dbus_worker_new (connection->stream,
                                            connection->capabilities,
-                                           (connection->flags & G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING),
+                                           ((connection->flags & G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING) != 0),
                                            on_worker_message_received,
                                            on_worker_message_about_to_be_sent,
                                            on_worker_closed,



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