OSDN Git Service

audio/player: Fix crash when current item UID is set to 0
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 26 Jun 2013 10:36:57 +0000 (13:36 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 26 Jun 2013 10:40:09 +0000 (13:40 +0300)
commitc6b9a502a070bac72c08c9100923aed120dc6ad7
treef2d3f6edaa91edc7326d539f2e84c1496a86a766
parent550dab5ce251ca54e81a9541b03be56a10c8744d
audio/player: Fix crash when current item UID is set to 0

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