[PATCH] Fix not detecting errors when transferring the last part of the buffer

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

 



From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx>

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

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