Linux bluetooth development
 help / color / mirror / Atom feed
* [Bluez-devel] SDP: deleting service record attributes
@ 2007-01-23  9:41 Stephen Crane
  2007-01-23  9:51 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Crane @ 2007-01-23  9:41 UTC (permalink / raw)
  To: bluez-devel

[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bluez-devel] SDP: deleting service record attributes
  2007-01-23  9:41 [Bluez-devel] SDP: deleting service record attributes Stephen Crane
@ 2007-01-23  9:51 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2007-01-23  9:51 UTC (permalink / raw)
  To: BlueZ development

Hi Steve,

> 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.

the patch has been committed to the CVS. Thanks.

Regards

Marcel



-------------------------------------------------------------------------
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
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-23  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23  9:41 [Bluez-devel] SDP: deleting service record attributes Stephen Crane
2007-01-23  9:51 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox