Bug fix: revert wrong workround code(closing gdbus stream) 20/192920/3 accepted/tizen/unified/20181123.063250 submit/tizen/20181122.055216
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 13 Nov 2018 02:19:55 +0000 (11:19 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Thu, 22 Nov 2018 02:01:41 +0000 (11:01 +0900)
As comment(on Related fixes #1), glib reports bug on "https://bugzilla.gnome.org/show_bug.cgi?id=734281.
But it is wrong report and is fixed by https://gitlab.gnome.org/GNOME/glib/commit/bf1a2d707928e129c96af365330b3ac26b04ad15

Related fixes #1
 - commit  : 94b01a47636b0787c9b39a5a1f3569edbdc593e9
 - comment :"Release 0.0.3"

Related fixes #2
 - commit  : 1c25a3cfa328a407cd2f4af59d8fe3a2b0e59cb0
 - comment : "Bug fix: do not close dbus io stream when group/user service was stopped."

Change-Id: I721040da87a97be87de454b670125db1d671ac2e
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
src/daemon/dbus/gumd-dbus-server-msg-bus.c

index f67d0c8..807bab2 100755 (executable)
@@ -147,8 +147,7 @@ _on_bus_acquired (
 
     DBG("Export user service interface");
 
-    server->priv->connection = connection;
-    g_object_ref(server->priv->connection);
+    server->priv->connection = g_object_ref(connection);
 
     server->priv->user_service =
                gumd_dbus_user_service_adapter_new_with_connection (
@@ -268,6 +267,7 @@ gumd_dbus_server_msg_bus_init (
     self->priv->user_service = NULL;
     self->priv->group_service = NULL;
     self->priv->name_owner_id = 0;
+    self->priv->connection = NULL;
 }
 
 static gboolean
@@ -318,21 +318,16 @@ _gumd_dbus_server_msg_bus_stop (
         server->priv->user_service = NULL;
     }
 
-    if (server->priv->connection) {
-        GIOStream *stream = g_dbus_connection_get_stream (server->priv->connection);
-        if (stream) {
-            DBG("g_io_stream_close '%p'", stream);
-            g_io_stream_close (stream, NULL, NULL);
-        }
-        g_object_unref (server->priv->connection);
-        server->priv->connection = NULL;
-    }
-
     if (server->priv->name_owner_id) {
         g_bus_unown_name (server->priv->name_owner_id);
         server->priv->name_owner_id = 0;
     }
 
+    if (server->priv->connection) {
+        g_object_unref (server->priv->connection);
+        server->priv->connection = NULL;
+    }
+
     return TRUE;
 }