Linux bluetooth development
 help / color / mirror / Atom feed
From: Stephen Crane <jscrane@maths.tcd.ie>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] SDP: deleting service record attributes
Date: Tue, 23 Jan 2007 09:41:20 +0000	[thread overview]
Message-ID: <20070123094120.GA79734@salmon.maths.tcd.ie> (raw)

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

Hi everyone,
I've noticed that service_update_req() in sdpd/service.c doesn't allow
previously-set attributes to be removed from a service record, only
new attributes to be added or existing ones updated.

The attached patch (against CVS) clears an existing service record's 
attributes before reading a new set from an SDP_SVC_UPDATE_REQ message.

Regards,
Steve

[-- Attachment #2: service.c.patch --]
[-- Type: text/plain, Size: 458 bytes --]

diff -u -r1.20 service.c
--- service.c   20 Jan 2007 20:42:27 -0000      1.20
+++ service.c   22 Jan 2007 17:55:47 -0000
@@ -289,6 +289,9 @@
                        rec->handle = handleExpected;
                        sdp_record_add(device, rec);
                }
+       } else {
+               sdp_list_free(rec->attrlist, (sdp_free_func_t)sdp_data_free);
+               rec->attrlist = NULL;
        }

        while (localExtractedLength < seqlen) {

[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2007-01-23  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23  9:41 Stephen Crane [this message]
2007-01-23  9:51 ` [Bluez-devel] SDP: deleting service record attributes Marcel Holtmann

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=20070123094120.GA79734@salmon.maths.tcd.ie \
    --to=jscrane@maths.tcd.ie \
    --cc=bluez-devel@lists.sourceforge.net \
    /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