[pulseaudio-discuss] [PATCH v5 36/39] bluetooth: Fail to load driver if discovery module is not loaded
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Sun Sep 29 06:40:11 PDT 2013
On Tue, 2013-09-24 at 19:45 -0300, jprvita at gmail.com wrote:
> diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
> index 36d7174..013cce5 100644
> --- a/src/modules/bluetooth/module-bluez5-device.c
> +++ b/src/modules/bluetooth/module-bluez5-device.c
> @@ -39,6 +39,7 @@
> #include <pulsecore/modargs.h>
> #include <pulsecore/poll.h>
> #include <pulsecore/rtpoll.h>
> +#include <pulsecore/shared.h>
> #include <pulsecore/socket-util.h>
> #include <pulsecore/thread.h>
> #include <pulsecore/thread-mq.h>
> @@ -1792,8 +1793,12 @@ int pa__init(pa_module* m) {
> goto fail;
> }
>
> - if (!(u->discovery = pa_bluetooth_discovery_get(m->core)))
> + if ((u->discovery = pa_shared_get(u->core, "bluetooth-discovery")))
> + pa_bluetooth_discovery_ref(u->discovery);
> + else {
> + pa_log_error("module-bluez5-discover doesn't seem to be loaded, refusing to load module-bluez5-device");
> goto fail;
> + }
(Note to self: there is ongoing discussion about this:
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17959/focus=18491)
--
Tanu
More information about the pulseaudio-discuss
mailing list