mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
bluetooth: Name BlueZ 4 symbols accordingly
We need diferent symbol prefixing for the current BlueZ 4 support and the new BlueZ 5 support which is about to enter the codebase, to avoid symbol clashing and crashing the daemon in the case both modules are loaded at the same time. This commit replaces all pa_bluetooth_ and pa_bt_ (for consistency) prefixes with pa_bluez4_, for both lower-case and upper-case, what was done with the following sed commands: $ sed -i s/pa_bluetooth_/pa_bluez4_/g src/modules/bluetooth/*bluez4* $ sed -i s/PA_BLUETOOTH_/PA_BLUEZ4_/g src/modules/bluetooth/*bluez4* $ sed -i s/pa_bt_/pa_bluez4_/g src/modules/bluetooth/*bluez4* $ sed -i s/PA_BT_/PA_BLUEZ4_/g src/modules/bluetooth/*bluez4*
This commit is contained in:
parent
438094baa4
commit
0f84fef04d
4 changed files with 300 additions and 300 deletions
|
|
@ -55,7 +55,7 @@ struct userdata {
|
|||
pa_module *module;
|
||||
pa_modargs *modargs;
|
||||
pa_core *core;
|
||||
pa_bluetooth_discovery *discovery;
|
||||
pa_bluez4_discovery *discovery;
|
||||
pa_hook_slot *slot;
|
||||
pa_hashmap *hashmap;
|
||||
};
|
||||
|
|
@ -65,7 +65,7 @@ struct module_info {
|
|||
uint32_t module;
|
||||
};
|
||||
|
||||
static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const pa_bluetooth_device *d, struct userdata *u) {
|
||||
static pa_hook_result_t load_module_for_device(pa_bluez4_discovery *y, const pa_bluez4_device *d, struct userdata *u) {
|
||||
struct module_info *mi;
|
||||
|
||||
pa_assert(u);
|
||||
|
|
@ -73,7 +73,7 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
|
|||
|
||||
mi = pa_hashmap_get(u->hashmap, d->path);
|
||||
|
||||
if (pa_bluetooth_device_any_audio_connected(d)) {
|
||||
if (pa_bluez4_device_any_audio_connected(d)) {
|
||||
|
||||
if (!mi) {
|
||||
pa_module *m = NULL;
|
||||
|
|
@ -145,10 +145,10 @@ int pa__init(pa_module* m) {
|
|||
ma = NULL;
|
||||
u->hashmap = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
|
||||
|
||||
if (!(u->discovery = pa_bluetooth_discovery_get(u->core)))
|
||||
if (!(u->discovery = pa_bluez4_discovery_get(u->core)))
|
||||
goto fail;
|
||||
|
||||
u->slot = pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED),
|
||||
u->slot = pa_hook_connect(pa_bluez4_discovery_hook(u->discovery, PA_BLUEZ4_HOOK_DEVICE_CONNECTION_CHANGED),
|
||||
PA_HOOK_NORMAL, (pa_hook_cb_t) load_module_for_device, u);
|
||||
|
||||
return 0;
|
||||
|
|
@ -174,7 +174,7 @@ void pa__done(pa_module* m) {
|
|||
pa_hook_slot_free(u->slot);
|
||||
|
||||
if (u->discovery)
|
||||
pa_bluetooth_discovery_unref(u->discovery);
|
||||
pa_bluez4_discovery_unref(u->discovery);
|
||||
|
||||
if (u->hashmap) {
|
||||
struct module_info *mi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue