* [PATCH obexd] Fix possible crash when indicating progress
@ 2011-10-03 15:43 Luiz Augusto von Dentz
2011-10-03 16:35 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2011-10-03 15:43 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The amount of transferred bytes should only be updated after it has
been sent.
---
client/transfer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/transfer.c b/client/transfer.c
index 4248055..85139ac 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -466,12 +466,12 @@ static gssize put_xfer_progress(void *buf, gsize len, gpointer user_data)
return size;
}
- transfer->transferred += size;
-
if (callback)
callback->func(transfer, transfer->transferred, NULL,
callback->data);
+ transfer->transferred += size;
+
return size;
}
--
1.7.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-03 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 15:43 [PATCH obexd] Fix possible crash when indicating progress Luiz Augusto von Dentz
2011-10-03 16:35 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox