pmqos: Do not send DBus method return message when PMQoS is not started accepted/tizen/4.0/unified/20171122.071144 submit/tizen_4.0/20171121.043948
authorWook Song <wook16.song@samsung.com>
Thu, 16 Nov 2017 06:48:48 +0000 (15:48 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 20 Nov 2017 00:52:33 +0000 (09:52 +0900)
When the PMQoS module receives PMQoS requests via DBus methods
invocation before its initialization, the module displays out the
message about that the module is not started yet and it returns a DBus
message to the sender. The following log message is displayed in the
systemd journal because of this DBus method return message sending:

pass[2132]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Although this warning may not harm any parts of the system, it is fixed
by this patch as well.

Change-Id: I4f22e4b429c2dcbbd2f1834ec485dc06bfdf24a2
Signed-off-by: Wook Song <wook16.song@samsung.com>
src/pmqos/pmqos.c

index bf6120f860139b586ced4b212a8b79973b1d976d..78854ddea79fcf3c47f4d0e467f91d9c4b64387d 100644 (file)
@@ -151,7 +151,7 @@ static gboolean dbus_cb_pmqos_legacy_scenario(SystemPassPmqos *obj,
                        _E("cannot set the PMQoS sceanrio: "
                                        "%s is not supported\n", name_from);
                        ret_out = FALSE;
-                       goto out;
+                       goto out_dbus;
                }
        }
 
@@ -160,9 +160,10 @@ static gboolean dbus_cb_pmqos_legacy_scenario(SystemPassPmqos *obj,
        else
                ret = pmqos_cancel(name_from);
 
-out:
+out_dbus:
        g_dbus_method_invocation_return_value(invoc, g_variant_new("(i)", ret));
 
+out:
        return ret_out;
 }