Skip to contentSkip to conversation

SDP: deleting service record attributes

Bluez-devel Stephen Crane 2 participants 2 messages Jan 23, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

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

service.c 22 Jan 2007 17:55:47 -0000 renamed from service.c 20 Jan 2007 20:42:27 -0000 1.20 +3 -0
diff -u -r1.20 service.c
@@ -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) {

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Steve,

Quoted 6 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel