All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] audio/player: Fix crash when current item UID is set to 0
@ 2013-06-26 10:36 Luiz Augusto von Dentz
  2013-06-26 10:41 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2013-06-26 10:36 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Apparently some stacks set the current UID to 0 when paused/stopped which
causes the following:

bluetoothd[23185]: profiles/audio/player.c:media_player_set_playlist_item() 0
bluetoothd[23185]: profiles/audio/player.c:media_folder_create_item() (null) type audio uid 0
process 23185: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_path (*string_p)" failed in file dbus-message.c line 2531.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

UID 0 is not a valid UID according to the spec so the code should not attempt
to create any object to represent it.
---
 profiles/audio/player.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 0834def..0c52ea9 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -1845,7 +1845,7 @@ struct media_item *media_player_set_playlist_item(struct media_player *mp,
 
 	DBG("%" PRIu64 "", uid);
 
-	if (folder == NULL)
+	if (folder == NULL || uid == 0)
 		return NULL;
 
 	item = media_folder_create_item(mp, folder, NULL,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH BlueZ] audio/player: Fix crash when current item UID is set to 0
  2013-06-26 10:36 [PATCH BlueZ] audio/player: Fix crash when current item UID is set to 0 Luiz Augusto von Dentz
@ 2013-06-26 10:41 ` Johan Hedberg
  2013-07-01 18:00   ` executing GetFolder Items leaves the session disconnected aji.kumar
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hedberg @ 2013-06-26 10:41 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Wed, Jun 26, 2013, Luiz Augusto von Dentz wrote:
> Apparently some stacks set the current UID to 0 when paused/stopped which
> causes the following:
> 
> bluetoothd[23185]: profiles/audio/player.c:media_player_set_playlist_item() 0
> bluetoothd[23185]: profiles/audio/player.c:media_folder_create_item() (null) type audio uid 0
> process 23185: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_path (*string_p)" failed in file dbus-message.c line 2531.
> This is normally a bug in some application using the D-Bus library.
>   D-Bus not built with -rdynamic so unable to print a backtrace
> 
> UID 0 is not a valid UID according to the spec so the code should not attempt
> to create any object to represent it.
> ---
>  profiles/audio/player.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* executing GetFolder Items leaves the session disconnected
  2013-06-26 10:41 ` Johan Hedberg
@ 2013-07-01 18:00   ` aji.kumar
  2013-07-01 19:26     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: aji.kumar @ 2013-07-01 18:00 UTC (permalink / raw)
  To: johan.hedberg, luiz.dentz; +Cc: linux-bluetooth

Hi Johan/Luiz,

I am currently involved in testing bluez for avrcp 1.4 controller roles with phones that support avrcp 1.4, but currently I am running out of luck..

Please help with the below questions?

        Does bluez have support for avrcp 1.4 controller role??

        If yes, How do we test bluez for 1.4 controller role with a phone that has implemented avrcp 1.4

By going through the "doc" it looks like that we need to get "<variable_path>/dev_bd_address/playerid" object path first to do any browsing and searching activities, why does this appear after a "source" and "control" connection with the device under test??

Is there any steps that is missing here?

With thanks and regards
Aji.






This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

______________________________________________________________________________________

www.accenture.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: executing GetFolder Items leaves the session disconnected
  2013-07-01 18:00   ` executing GetFolder Items leaves the session disconnected aji.kumar
@ 2013-07-01 19:26     ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2013-07-01 19:26 UTC (permalink / raw)
  To: aji.kumar; +Cc: Johan Hedberg, linux-bluetooth

Hi Aji,

On Mon, Jul 1, 2013 at 9:00 PM,  <aji.kumar@accenture.com> wrote:
> Hi Johan/Luiz,
>
> I am currently involved in testing bluez for avrcp 1.4 controller roles with phones that support avrcp 1.4, but currently I am running out of luck..
>
> Please help with the below questions?
>
>         Does bluez have support for avrcp 1.4 controller role??
>
>         If yes, How do we test bluez for 1.4 controller role with a phone that has implemented avrcp 1.4

You can use our command line tool under tools/bluetooth-player or use
tools/mpris-player to emulate a MPRIS player in the system and then
control it using MPRIS clients.

> By going through the "doc" it looks like that we need to get "<variable_path>/dev_bd_address/playerid" object path first to do any browsing and searching activities, why does this appear after a "source" and "control" connection with the device under test??

We need to discover the players as per 1.4 it is possible to have more
than one with different capabilities and you most likely would not be
able to do anything without being connected so at this point I not
really following about control connection because you can't really
connect the browsing channel without it.

> Is there any steps that is missing here?
>
> With thanks and regards
> Aji.
>
>
>
>
>
>
> This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.
>
> Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
>
> ______________________________________________________________________________________
>
> www.accenture.com
>



--
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-01 19:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 10:36 [PATCH BlueZ] audio/player: Fix crash when current item UID is set to 0 Luiz Augusto von Dentz
2013-06-26 10:41 ` Johan Hedberg
2013-07-01 18:00   ` executing GetFolder Items leaves the session disconnected aji.kumar
2013-07-01 19:26     ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.