From: Vinicius Gomes <vinicius.gomes@openbossa.org>
To: Ed Tsang <netdesign_98@yahoo.com>
Cc: Bluettooth Linux <linux-bluetooth@vger.kernel.org>
Subject: Re: obexd 0.14 "put" file corruption
Date: Fri, 5 Mar 2010 16:35:41 -0300 [thread overview]
Message-ID: <2a9506371003051135v3bf107dct36cc9ab71a213326@mail.gmail.com> (raw)
In-Reply-To: <768077.72808.qm@web52601.mail.re2.yahoo.com>
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
next prev parent reply other threads:[~2010-03-05 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 22:23 obexd 0.14 "put" file corruption Ed Tsang
2010-02-26 8:41 ` Luiz Augusto von Dentz
2010-03-05 16:31 ` Bastien Nocera
2010-03-05 18:07 ` Ed Tsang
2010-03-05 19:35 ` Vinicius Gomes [this message]
2010-03-05 19:51 ` Ed Tsang
2010-03-05 20:38 ` Vinicius Gomes
2010-03-08 14:31 ` Bastien Nocera
2010-03-08 16:53 ` Ed Tsang
-- strict thread matches above, loose matches on Subject: below --
2010-02-24 21:50 Ed Tsang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a9506371003051135v3bf107dct36cc9ab71a213326@mail.gmail.com \
--to=vinicius.gomes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=netdesign_98@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox