aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaman <mahmoudi.saman1@gmail.com>2021-01-27 14:13:08 +0330
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-02-03 11:14:57 +0000
commit4704a703f34cb12321c3b13a423f5a1df7f89439 (patch)
tree9c505840dbfd86c082995fccd1395c948984be97
parentad4b0c6576fb88f550397356e1af5a2f5dc4f47c (diff)
Bug-AGL: SPEC-3785 Change-Id: I792bac4fe96228840eb5d43abdc4a364d2127207 Signed-off-by: saman <mahmoudi.saman1@gmail.com> (cherry picked from commit ce5000f42dbfa854096a6e8c9da34d48ed04ef31)
-rw-r--r--binding/bluetooth-api.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c
index 49ae4e7..8a9945a 100644
--- a/binding/bluetooth-api.c
+++ b/binding/bluetooth-api.c
@@ -1381,11 +1381,8 @@ static void bluetooth_avrcp_controls(afb_req_t request)
if (device) {
/* TODO: handle multiple players per device */
jval = bluez_get_property(ns, BLUEZ_AT_MEDIACONTROL, device, FALSE, "Player", NULL);
- if (jval) {
+ if (jval)
player = (gchar *)json_object_get_string(jval);
- json_object_put(jval);
- jval = NULL;
- }
if (!player)
player = g_strconcat(device, "/", BLUEZ_DEFAULT_PLAYER, NULL);
g_free(device);