From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] gattrib: Fix command timeout handling
Date: Tue, 5 Jun 2012 11:20:21 -0300 [thread overview]
Message-ID: <20120605142021.GA3988@samus> (raw)
In-Reply-To: <1338898622-18408-1-git-send-email-johan.hedberg@gmail.com>
Hi Johan,
On 20:17 Tue 05 Jun, Johan Hedberg wrote:
> From: Johan Hedberg <johan.hedberg@intel.com>
>
> This patch fixes command timeout handling. Previously attrib_destroy was
> explicitly called which ignored any reference holders. This patch fixes
> the issue by first passing errors to command callbacks and after that
> marking the GAttrib object as stale so no further operations can be
> done.
> ---
> This is an untested patch which should hopefully fix bluetoothd crashes
> when we fail to receive a response to a command. I'm sending it to
> linux-bluetooth in case someone can spot some obvious problem with it.
> If there are no objections I'll complete testing of it during the next
> 24 hours and then apply it upstream.
Looks fine to me as well.
On a side note, I took a look at how gatchat[1] (from ofono) does this, and
it gave me some ideas about how to simplify some things, I am thinking
mostly about the GAttrib destruction code path. And this "stale"
condition would be useful.
[snip]
Cheers,
--
Vinicius
[1] http://git.kernel.org/?p=network/ofono/ofono.git;a=blob;f=gatchat/gatio.c;hb=HEAD
prev parent reply other threads:[~2012-06-05 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 12:17 [PATCH] gattrib: Fix command timeout handling Johan Hedberg
2012-06-05 12:25 ` Ganir, Chen
2012-06-05 14:20 ` Vinicius Costa Gomes [this message]
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=20120605142021.GA3988@samus \
--to=vinicius.gomes@openbossa.org \
--cc=johan.hedberg@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;
as well as URLs for NNTP newsgroup(s).