[PATCH 3/3] bluetooth: Add pa_bluetooth_transport_unlink

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

 



On Mon, 2014-09-08 at 12:14 +0300, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>
> 
> ---
>  src/modules/bluetooth/bluez5-util.c | 4 ++++
>  src/modules/bluetooth/bluez5-util.h | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
> index 3c0d6e1..e14b1fa 100644
> --- a/src/modules/bluetooth/bluez5-util.c
> +++ b/src/modules/bluetooth/bluez5-util.c
> @@ -196,6 +196,10 @@ void pa_bluetooth_transport_put(pa_bluetooth_transport *t) {
>      pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
>  }
>  
> +void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t) {
> +    pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
> +}
> +
>  void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
>      pa_assert(t);
>  
> diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
> index 5bcab16..d41bf28 100644
> --- a/src/modules/bluetooth/bluez5-util.h
> +++ b/src/modules/bluetooth/bluez5-util.h
> @@ -114,6 +114,7 @@ pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const
>  
>  void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state);
>  void pa_bluetooth_transport_put(pa_bluetooth_transport *t);
> +void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t);
>  void pa_bluetooth_transport_free(pa_bluetooth_transport *t);
>  
>  bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d);

Thanks, pushed.

I'd like to call unlink() from free(), I'll send a patch for that.

-- 
Tanu



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

  Powered by Linux