Fixed bug where gum-utils hangs in offline mode
authorImran Zaman <imran.zaman@intel.com>
Fri, 24 Oct 2014 14:10:57 +0000 (17:10 +0300)
committerImran Zaman <imran.zaman@intel.com>
Fri, 24 Oct 2014 14:22:07 +0000 (17:22 +0300)
configure.ac
dists/debian/changelog
dists/rpm/gum-suse.spec
dists/rpm/tizen/packaging/gumd.changes
dists/rpm/tizen/packaging/gumd.spec
src/lib/gum-group.c
src/lib/gum-user.c
test/test_common.mk

index 7da027e..f08b760 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.60])
-AC_INIT([gumd], [1.0.0],[],[],[https://github.com/01org/gumd])
+AC_INIT([gumd], [1.0.1],[],[],[https://github.com/01org/gumd])
 AC_CONFIG_SRCDIR([src/daemon/main.c])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([build-aux])
index b42979d..dddf092 100644 (file)
@@ -1,3 +1,9 @@
+gumd (1.0.1-0) unstable; urgency=low
+
+  * Fixed bug where gum-utils hangs in offline mode
+
+ -- Imran Zaman <imran.zaman@intel.com>  Fri, 24 Oct  2014 18:00:00 +0300
+
 gumd (1.0.0-0) unstable; urgency=low
 
   * Added sysroot support (in offline mode) to gum-utils.
index 798cf4e..c381eb0 100644 (file)
@@ -7,7 +7,7 @@
 
 Name: gumd
 Summary: User management daemon and client library
-Version: 1.0.0
+Version: 1.0.1
 Release: 0
 Group: System/Daemons
 License: LGPL-2.1+
@@ -135,6 +135,9 @@ mkdir -p %{_sysconfdir}/%{name}/groupdel.d
 
 
 %changelog
+* Fri Oct 24 2014 Imran Zaman <imran.zaman@intel.com>
+- Fixed bug where gum-utils hangs in offline mode
+
 * Thu Oct 23 2014 Imran Zaman <imran.zaman@intel.com>
 - Added sysroot support (in offline mode) to gum-utils
 - Removed offline support from gumd as it is moved to libgum/gum-utils 
index 67f9cd2..d46dcef 100644 (file)
@@ -1,3 +1,6 @@
+* Fri Oct 24 2014 Imran Zaman <imran.zaman@intel.com>
+- Fixed bug where gum-utils hangs in offline mode
+
 * Thu Oct 23 2014 Imran Zaman <imran.zaman@intel.com>
 - Added sysroot support (in offline mode) to gum-utils
 - Removed offline support from gumd as it is moved to libgum/gum-utils 
index 12dd618..a2ffd91 100644 (file)
@@ -6,7 +6,7 @@
 
 Name: gumd
 Summary: User management daemon and client library
-Version: 1.0.0
+Version: 1.0.1
 Release: 0
 Group: Security/Accounts
 License: LGPL-2.1+
index 13fe715..aac9a20 100644 (file)
@@ -219,8 +219,12 @@ _set_property (
     GumGroup *self = GUM_GROUP (object);
     switch (property_id) {
         case PROP_OFFLINE: {
-            if (g_value_get_boolean (value))
+            if (g_value_get_boolean (value)) {
                 self->priv->offline_service = gumd_daemon_new ();
+            } else {
+                self->priv->cancellable = g_cancellable_new ();
+                self->priv->dbus_service = gum_group_service_get_instance ();
+            }
             break;
         }
         default: {
@@ -310,13 +314,8 @@ gum_group_init (
     self->priv = GUM_GROUP_PRIV (self);
     self->priv->dbus_group = NULL;
     self->priv->offline_group = NULL;
-    if (!self->priv->offline_service) {
-        self->priv->cancellable = g_cancellable_new ();
-        self->priv->dbus_service = gum_group_service_get_instance ();
-    } else {
-        self->priv->cancellable = NULL;
-        self->priv->dbus_service = NULL;
-    }
+    self->priv->cancellable = NULL;
+    self->priv->dbus_service = NULL;
     self->priv->op = NULL;
 }
 
index 802d172..876902a 100644 (file)
@@ -227,8 +227,12 @@ _set_property (
     GumUser *self = GUM_USER (object);
     switch (property_id) {
         case PROP_OFFLINE: {
-            if (g_value_get_boolean (value))
+            if (g_value_get_boolean (value)) {
                 self->priv->offline_service = gumd_daemon_new ();
+            } else {
+                self->priv->cancellable = g_cancellable_new ();
+                self->priv->dbus_service = gum_user_service_get_instance ();
+            }
             break;
         }
         default: {
@@ -318,13 +322,8 @@ gum_user_init (
     self->priv = GUM_USER_PRIV (self);
     self->priv->dbus_user = NULL;
     self->priv->offline_user = NULL;
-    if (!self->priv->offline_service) {
-        self->priv->cancellable = g_cancellable_new ();
-        self->priv->dbus_service = gum_user_service_get_instance ();
-    } else {
-        self->priv->cancellable = NULL;
-        self->priv->dbus_service = NULL;
-    }
+    self->priv->cancellable = NULL;
+    self->priv->dbus_service = NULL;
     self->priv->op = NULL;
 }
 
@@ -820,7 +819,7 @@ gum_user_create_sync (
     GError *error = NULL;
     gchar *object_path = NULL;
 
-    GumUser *user = GUM_USER (g_object_new (GUM_TYPE_USER,  "offline", offline,
+    GumUser *user = GUM_USER (g_object_new (GUM_TYPE_USER, "offline", offline,
             NULL));
 
     if (!user) return NULL;
index 95cdc90..168c0b0 100644 (file)
@@ -1,5 +1,5 @@
 TESTS_ENVIRONMENT = \
        G_MESSAGES_DEBUG="all" \
-       LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/dbus/.libs"
+       LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/daemon/core/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/dbus/.libs"
 
 TEST_CFLAGS = -DGUM_TEST_DATA_DIR=\"$(abs_top_srcdir)/test/data/\"
\ No newline at end of file