Re: [PATCH 2/2] Bluetooth: FTP and OPP over L2CAP

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

 



Hi Nami,

> From: nami <nami.li@xxxxxxxxxxx>
> 
> 
> Signed-off-by: Nami <nami.li@xxxxxxxxxxx>

same as with the other one.

> ---
>  glib/obex-lowlevel.c          |    2 +-
>  include/openobex/obex.h       |    2 +-
>  include/openobex/obex_const.h |    5 +++++
>  lib/obex.c                    |    3 ++-
>  lib/obex_main.c               |    5 ++++-
>  lib/obex_transport.h          |    1 +
>  6 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/glib/obex-lowlevel.c b/glib/obex-lowlevel.c
> index 65172fc..660fc37 100644
> --- a/glib/obex-lowlevel.c
> +++ b/glib/obex-lowlevel.c
> @@ -496,7 +496,7 @@ obex_t *obex_open(int fd, obex_callback_t *callback, void *data)
> 
>  	OBEX_SetTransportMTU(handle, sizeof(context->buf), sizeof(context->buf));
> 
> -	if (FdOBEX_TransportSetup(handle, fd, fd, 0) < 0) {
> +	if (FdOBEX_TransportSetup(handle, fd, fd, 0, OBEX_MT_STREAM) < 0) {
>  		OBEX_Cleanup(handle);
>  		return NULL;
>  	}
> diff --git a/include/openobex/obex.h b/include/openobex/obex.h
> index f948113..0d7afec 100644
> --- a/include/openobex/obex.h
> +++ b/include/openobex/obex.h
> @@ -147,7 +147,7 @@ OPENOBEX_SYMBOL(int) BtOBEX_TransportConnect(obex_t *self, bt_addr_t *src, bt_ad
>  /*
>   * OBEX File API
>   */
> -OPENOBEX_SYMBOL(int) FdOBEX_TransportSetup(obex_t *self, int rfd, int wfd, int mtu);
> +OPENOBEX_SYMBOL(int) FdOBEX_TransportSetup(obex_t *self, int rfd, int wfd, int mtu, int fmt);

this is breaking public API.

>  /*
>   * OBEX interface discovery API
> diff --git a/include/openobex/obex_const.h b/include/openobex/obex_const.h
> index cb7afeb..4a0a7e9 100644
> --- a/include/openobex/obex_const.h
> +++ b/include/openobex/obex_const.h
> @@ -302,6 +302,11 @@ enum obex_rsp_mode {
>    OBEX_RSP_MODE_SINGLE = 1, /**< single response mode (SRM) */
>  };
> 
> +enum obex_transport_format{
> +	 OBEX_MT_STREAM ,
> +	 OBEX_MT_SEQPACKET
> +};
> +

And more important, I have no idea why are you doing this anyway. Even
with L2CAP this should run over SOCK_STREAM.

I assumed that OPP and FTP over L2CAP are requiring eL2CAP actually
which is re-presented as a stream.

Regards

Marcel


--
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