Re: obexd 0.14 "put" file corruption

Vinicius Gomes
2010-03-05T19:35:41Z

Hi Ed,

On Fri, Mar 5, 2010 at 3:07 PM, Ed Tsang <netdesign_98@yahoo.com> wrote:
> I think I found the problem.  It is when the MTU is 4096, the send size is set to
> 3896 (200 for the overhead). So the last 200 did not get send
> and it remember as "pre-fill" for the next transfer. The code did try to move the data but incorrectly.
>
>   clinet/session.c  put_xfer_progress()
> ----- origional
>  memmove(session->buffer + written, session->buffer, session->filled);
>  /* try to move from the remaining from the bottom of the buffer to the beginning of buffer
>   but memove is (*dest, * src, len)  not as normally most people, including me, will guess (*src, *dest, len)
> -------- should be
>  memmove(session->buffer, session->buffer + written,  session->filled);
>
>

Yeah, I can reproduce it changing DEFAULT_BUFFER_SIZE to something
bigger, 32767 for example.

Care to send a patch against the current git?

Thanks for the report.

> with the change, it seem working now?
>
>
> Ed
>

Cheers,
--
Vinicius Gomes
INdT - Instituto Nokia de Tecnologia