mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 10:13:29 +00:00
drop connection field in service_record_item_t
This commit is contained in:
parent
00cae490be
commit
32a66b8deb
@ -200,9 +200,7 @@ uint32_t sdp_register_service_internal(void *connection, uint8_t * record){
|
||||
if (!newRecordItem) {
|
||||
return 0;
|
||||
}
|
||||
// link new service item to client connection
|
||||
newRecordItem->connection = connection;
|
||||
|
||||
|
||||
// set new handle
|
||||
newRecordItem->service_record_handle = record_handle;
|
||||
|
||||
@ -237,12 +235,11 @@ uint32_t sdp_register_service_internal(void *connection, uint8_t * record){
|
||||
//
|
||||
void sdp_unregister_service_internal(void *connection, uint32_t service_record_handle){
|
||||
service_record_item_t * record_item = sdp_get_record_for_handle(service_record_handle);
|
||||
if (record_item && record_item->connection == connection) {
|
||||
linked_list_remove(&sdp_service_records, (linked_item_t *) record_item);
|
||||
if (!record_item) return;
|
||||
linked_list_remove(&sdp_service_records, (linked_item_t *) record_item);
|
||||
#ifndef EMBEDDED
|
||||
free(record_item);
|
||||
free(record_item);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// PDU
|
||||
|
@ -63,9 +63,6 @@ typedef struct {
|
||||
// linked list - assert: first field
|
||||
linked_item_t item;
|
||||
|
||||
// client connection
|
||||
void * connection;
|
||||
|
||||
// data is contained in same memory
|
||||
uint32_t service_record_handle;
|
||||
uint8_t service_record[1]; // waste 1 byte to allow compilation with older compilers
|
||||
|
Loading…
x
Reference in New Issue
Block a user