* [PATCH] Fix SDP handling when the SDP record is modified on remote device.
@ 2009-10-22 22:46 jaikumar
2009-10-22 23:11 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: jaikumar @ 2009-10-22 22:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jaikumar Ganesh
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix SDP handling when the SDP record is modified on remote device.
2009-10-22 22:46 [PATCH] Fix SDP handling when the SDP record is modified on remote device jaikumar
@ 2009-10-22 23:11 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2009-10-22 23:11 UTC (permalink / raw)
To: jaikumar; +Cc: linux-bluetooth
Hi Jaikumar,
On Thu, Oct 22, 2009, jaikumar@google.com wrote:
> 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(-)
The patch makes sense and has been pushed upstream. Thanks. However, I'm
not aware of any code in the current bluez tree that would actually try to
use the cached RFCOMM channels. E.g. the serial plugin as well as the
HFP/HSP implementation always do explicit lookups over SDP before
attempting to connect. So most likely there's no immediate benefit of the
patch but it's still good to have it in case some future code does rely
more heavily on the SDP record cache.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-22 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 22:46 [PATCH] Fix SDP handling when the SDP record is modified on remote device jaikumar
2009-10-22 23:11 ` Johan Hedberg
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).