Re: [PATCH] obex-client-tool: Set the length header

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

 



Hi Luiz,

On Wednesday, April 23, 2014 11:28:55 AM Luiz Augusto von Dentz wrote:
> Try the with the following patch:
> 
> diff --git a/obexd/src/obex.c b/obexd/src/obex.c
> index bd4770d..7b4634e 100644
> --- a/obexd/src/obex.c
> +++ b/obexd/src/obex.c
> @@ -873,6 +873,10 @@ static void cmd_put(GObex *obex, GObexPacket
> *req, gpointer user_data)
> 
>         os->cmd = G_OBEX_OP_PUT;
> 
> +       /* Set size to unknown if a body header exists */
> +       if (g_obex_packet_get_body(req))
> +               os->size = OBJECT_SIZE_UNKNOWN;
> +
>         parse_name(os, req);
>         parse_length(os, req);
>         parse_time(os, req);

I tried your patch with the old obexd v0.48 and it worked (I am sorry I could not easily try with the newest obexd from bluez tree).

Both patches seems worth to apply - mine to make the obex-client-tool work with old buggy devices.

Here is your patch aligned for v0.48:

diff --git a/src/obex.c b/src/obex.c
index 9044961..5ae4ff1 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -961,6 +961,10 @@ static void cmd_put(GObex *obex, GObexPacket *req, gpointer user_data)
 
        os->cmd = G_OBEX_OP_PUT;
 
+       /* Set size to unknown if a body header exists */
+       if (g_obex_packet_get_body(req))
+               os->size = OBJECT_SIZE_UNKNOWN;
+
        parse_name(os, req);
        parse_length(os, req);
        parse_time(os, req);
--

BR,
Martin



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