[PATCH v5 36/39] bluetooth: Fail to load driver if discovery module is not loaded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux