From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Fix not detecting errors when transferring the last part of the buffer
Date: Tue, 28 Sep 2010 10:52:25 +0300 [thread overview]
Message-ID: <1285660345-1819-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
The last part has to be flushed in order to sent the remaining buffer as
a obex packet and detect possible errors.
---
client/transfer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/client/transfer.c b/client/transfer.c
index 58ac265..8ceb36f 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -379,8 +379,10 @@ static void put_xfer_progress(GwObexXfer *xfer, gpointer user_data)
transfer->filled += len;
- if (transfer->filled == 0)
+ if (transfer->filled == 0) {
+ gw_obex_xfer_flush(xfer, &err);
goto done;
+ }
if (gw_obex_xfer_write(xfer, transfer->buffer,
transfer->filled,
--
1.7.1
next reply other threads:[~2010-09-28 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 7:52 Luiz Augusto von Dentz [this message]
2010-09-28 8:10 ` [PATCH] Fix not detecting errors when transferring the last part of the buffer Johan Hedberg
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=1285660345-1819-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/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