All of lore.kernel.org
 help / color / mirror / Atom feed
From: jaikumar@google.com
To: linux-bluetooth@vger.kernel.org
Cc: Jaikumar Ganesh <jaikumar@google.com>
Subject: [PATCH] Fix SDP handling when the SDP record is modified on remote device.
Date: Thu, 22 Oct 2009 15:46:27 -0700	[thread overview]
Message-ID: <1256251587-18043-1-git-send-email-jaikumar@google.com> (raw)

From: Jaikumar Ganesh <jaikumar@google.com>

We invalidate the in-memory SDP records list only when a profile
is added or removed. So when a SDP record attribute like the rfcomm
channel number is modified on the remote device, we will miss the update.
---
 src/device.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/device.c b/src/device.c
index 63f35de..6cb9641 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1313,11 +1313,6 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data)
 
 	update_services(req, recs);
 
-	if (!req->profiles_added && !req->profiles_removed) {
-		debug("%s: No service update", device->path);
-		goto proceed;
-	}
-
 	if (device->tmp_records && req->records) {
 		sdp_list_free(device->tmp_records,
 					(sdp_free_func_t) sdp_record_free);
@@ -1325,6 +1320,11 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data)
 		req->records = NULL;
 	}
 
+	if (!req->profiles_added && !req->profiles_removed) {
+		debug("%s: No service update", device->path);
+		goto proceed;
+	}
+
 	/* Probe matching drivers for services added */
 	if (req->profiles_added)
 		device_probe_drivers(device, req->profiles_added);
-- 
1.6.2.3


             reply	other threads:[~2009-10-22 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 22:46 jaikumar [this message]
2009-10-22 23:11 ` [PATCH] Fix SDP handling when the SDP record is modified on remote device 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=1256251587-18043-1-git-send-email-jaikumar@google.com \
    --to=jaikumar@google.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.