From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH] device: Fix sending unneeded property change signals
Date: Fri, 21 Mar 2014 16:06:34 +0100 [thread overview]
Message-ID: <1395414394-32126-1-git-send-email-szymon.janc@tieto.com> (raw)
Send property change for Modalias only if it changed. This fix sending
multiple unneeded property change events during discovery.
---
src/device.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/device.c b/src/device.c
index 601dfdc..a69cfa6 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4811,6 +4811,10 @@ gboolean btd_device_remove_attio_callback(struct btd_device *device, guint id)
void btd_device_set_pnpid(struct btd_device *device, uint16_t source,
uint16_t vendor, uint16_t product, uint16_t version)
{
+ if (device->vendor_src == source && device->version == version &&
+ device->vendor == vendor && device->product == product)
+ return;
+
device->vendor_src = source;
device->vendor = vendor;
device->product = product;
--
1.8.3.2
next reply other threads:[~2014-03-21 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 15:06 Szymon Janc [this message]
2014-03-21 15:58 ` [PATCH] device: Fix sending unneeded property change signals 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=1395414394-32126-1-git-send-email-szymon.janc@tieto.com \
--to=szymon.janc@tieto.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.