* [PATCH] Fix not detecting errors when transferring the last part of the buffer
@ 2010-09-28 7:52 Luiz Augusto von Dentz
2010-09-28 8:10 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2010-09-28 7:52 UTC (permalink / raw)
To: linux-bluetooth
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-28 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 7:52 [PATCH] Fix not detecting errors when transferring the last part of the buffer Luiz Augusto von Dentz
2010-09-28 8:10 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox