From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH obexd] Fix possible crash when indicating progress
Date: Mon, 3 Oct 2011 18:43:16 +0300 [thread overview]
Message-ID: <1317656596-15972-1-git-send-email-luiz.dentz@gmail.com> (raw)
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
next reply other threads:[~2011-10-03 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 15:43 Luiz Augusto von Dentz [this message]
2011-10-03 16:35 ` [PATCH obexd] Fix possible crash when indicating progress Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317656596-15972-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox