[liboobs] Fix setting gboolean 'password-disabled' property



commit af71c37745197f17d57e68cc8e2b1262703f4140
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Mon Mar 8 23:19:04 2010 +0100

    Fix setting gboolean 'password-disabled' property
    
    g_object_set() seems to be considering a gboolean as an integer. Force it being TRUE or FALSE to avoid failures when setting the property.

 oobs/oobs-user.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/oobs/oobs-user.c b/oobs/oobs-user.c
index d7ff0a7..9de6406 100644
--- a/oobs/oobs-user.c
+++ b/oobs/oobs-user.c
@@ -496,7 +496,7 @@ _oobs_user_create_from_dbus_reply (OobsUser        *user,
 
   passwd_flags = utils_get_int (&iter);
   passwd_empty = passwd_flags & 1;
-  passwd_disabled = passwd_flags & (1 << 1);
+  passwd_disabled = ((passwd_flags & (1 << 1)) != 0);
 
   enc_home = utils_get_boolean (&iter);
   home_flags = utils_get_int (&iter);



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