bluetooth: Protect from a misbehaving bluetoothd
authorJoão Paulo Rechi Vita <jprvita@gmail.com>
Tue, 24 Sep 2013 22:45:36 +0000 (19:45 -0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 29 Sep 2013 13:54:37 +0000 (16:54 +0300)
commit82fd8cc845f9366405d0093a1219cd11f521c96d
tree1ba37f3ac7b4e4363d90a682ca69bcb5d09db358
parent89e97215c7166f1d6993d1381232257a68f51c84
bluetooth: Protect from a misbehaving bluetoothd

bluetoothd always send the GetManagedObjects() reply messages with the
objects array argument following an in-depth order starting from the
root. That means parents will always be known at the time their children
objects are parsed, if clients parse the objects in the same order they
appear in the array, as we do in PulseAudio.

This commit tries to protect PulseAudio in the case bluetoothd changes
that behavior for some reason. It hasn't been tested, since this
situation never occurs.
src/modules/bluetooth/bluez5-util.c
src/modules/bluetooth/bluez5-util.h