Linux bluetooth development
 help / color / mirror / Atom feed
* [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

* Re: [PATCH obexd] Fix possible crash when indicating progress
  2011-10-03 15:43 [PATCH obexd] Fix possible crash when indicating progress Luiz Augusto von Dentz
@ 2011-10-03 16:35 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-10-03 16:35 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Mon, Oct 03, 2011, Luiz Augusto von Dentz wrote:
> 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(-)

Applied. Thanks.

Johan

^ permalink raw reply	[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