Re: [PATCH 1/6] emulator/bthost: Add api to handle RFCOMM data on bthost

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

 



Hi Marcin,

On Wed, Feb 12, 2014, Marcin Kraglak wrote:
> With this change user can handle data received on RFCOMM connection.
> ---
>  emulator/bthost.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++----
>  emulator/bthost.h |  8 +++++++
>  2 files changed, 74 insertions(+), 4 deletions(-)
> 
> diff --git a/emulator/bthost.c b/emulator/bthost.c
> index 8447817..92ae08a 100644
> --- a/emulator/bthost.c
> +++ b/emulator/bthost.c
> @@ -126,6 +126,13 @@ struct cid_hook {
>  	struct cid_hook *next;
>  };
>  
> +struct channel_hook {

Since this is RFCOMM specific and the concept of channels exists also
with L2CAP I'd include "rfcomm" somewhere in the struct name.

> @@ -232,6 +240,12 @@ static void btconn_free(struct btconn *conn)
>  		conn->cid_hooks = hook->next;
>  		free(hook);
>  	}
> +	while (conn->channel_hooks) {

Coding style: empty line before the while statement.

> +void bthost_add_channel_hook(struct bthost *bthost, uint16_t handle,
> +					uint8_t channel,
> +					bthost_channel_hook_func_t func,
> +					void *user_data);

Here you should also have "rfcomm" somewhere in the name since it's
RFCOMM specific and we don't people to confuse this with L2CAP.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux