Diff between 3c2d4613be1fa468afd550fc7335ff28abccf223 and 5d2baeb644ae34a5fca7d88307f68b2b85c75e63

Changed Files

File Additions Deletions Status
tools/obexctl.c +8 -0 modified

Full Patch

diff --git a/tools/obexctl.c b/tools/obexctl.c
index 4e46c75..2ef1c04 100644
--- a/tools/obexctl.c
+++ b/tools/obexctl.c
@@ -1862,6 +1862,14 @@ static void print_transferred(struct transfer_data *data, const char *str,
 	int seconds, minutes;
 
 	dbus_message_iter_get_basic(iter, &valu64);
+
+	/*
+	 * Use the file size to output the proper size/speed since obexd resets
+	 * the current transferred size to zero on completion of transfer.
+	 */
+	if (valu64 == 0)
+		valu64 = data->size;
+
 	speed = valu64 - data->transferred;
 	data->transferred = valu64;