pmqos: Do not send DBus method return message when PMQoS is not started 46/160446/4 accepted/tizen/unified/20171123.065848 submit/tizen/20171123.001235
authorWook Song <wook16.song@samsung.com>
Thu, 16 Nov 2017 06:48:48 +0000 (15:48 +0900)
committerWook Song <wook16.song@samsung.com>
Thu, 16 Nov 2017 22:55:43 +0000 (07:55 +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 bf6120f..78854dd 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;
 }