linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Carot-Nemesio <sancane@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Santiago Carot-Nemesio <sancane@gmail.com>
Subject: [PATCH] Fix repeated insertion of uuids when a device driver is matched
Date: Sat, 22 May 2010 12:01:39 +0200	[thread overview]
Message-ID: <1274522499-7844-1-git-send-email-sancane@gmail.com> (raw)

---
 src/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/device.c b/src/device.c
index 6ba1612..2b6b97f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1085,7 +1085,9 @@ static GSList *device_match_driver(struct btd_device *device,
 		/* match pattern driver */
 		match = device_match_pattern(device, *uuid, profiles);
 		for (; match; match = match->next)
-			uuids = g_slist_append(uuids, match->data);
+			if (!g_slist_find_custom(uuids, match->data,
+					(GCompareFunc) strcasecmp))
+				uuids = g_slist_append(uuids, match->data);
 	}
 
 	return uuids;
-- 
1.6.3.3


                 reply	other threads:[~2010-05-22 10:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1274522499-7844-1-git-send-email-sancane@gmail.com \
    --to=sancane@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).