Skip to contentSkip to conversation

non persistent sdp records

Bluez-devel Frederic Dalleau 2 participants 6 messages May 10, 2007 – May 11, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

Until today, I was using non persistent sdp records like this

sdp_connect()
sdp_record_alloc()
sdp_record_register()
sdp_record_free()
[Bluetooth profile executing]
sdp_close()

Recently, I found my sdp records were accumulating each time I reregistered them, even if the sdp session was closed. I saw this on bluez 3.9 but not on bluez 3.7.

Does this mean all sdp records are now persistent or was I doing bad thing since the beginning or something else?

Frederic

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Frederic,

Quoted 9 lines

Until today, I was using non persistent sdp records like this

sdp_connect()
sdp_record_alloc()
sdp_record_register()
sdp_record_free()
[Bluetooth profile executing]
sdp_close()

Quoted 6 lines

Recently, I found my sdp records were accumulating each time I reregistered them, even if the sdp session was closed. I saw this on bluez 3.9 but not on bluez 3.7.

Does this mean all sdp records are now persistent or was I doing bad thing since the beginning or something else?

this sounds like a bug. Do you use standalone sdpd or hcid with -s?

You might wanna consider to use D-Bus to register the records since bluez-utils-3.10 is ready to be pushed out now.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

Marcel,
Thanks for answer. I'm using standalone sdpd.
We will probably consider dbus as is sounds much easier, but it is important to be able to do as much as what can be done through sdp api. Frederic

Quoted 31 lines · Marcel Holtmann

Hi Frederic,

Quoted 9 lines

Until today, I was using non persistent sdp records like this

sdp_connect()
sdp_record_alloc()
sdp_record_register()
sdp_record_free()
[Bluetooth profile executing]
sdp_close()

Quoted 7 lines

Recently, I found my sdp records were accumulating each time I reregistered them, even if the sdp session was closed. I saw this on bluez 3.9 but not on bluez 3.7.

Does this mean all sdp records are now persistent or was I doing bad thing since the beginning or something else?

this sounds like a bug. Do you use standalone sdpd or hcid with -s?

You might wanna consider to use D-Bus to register the records since bluez-utils-3.10 is ready to be pushed out now.

Regards

Marcel

Quoted 10 lines

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Frederic,

Quoted 1 line

Thanks for answer. I'm using standalone sdpd.

actually using the standalone is a race condition. You should really consider switching to hcid -s. It also saves you some memory footprint.

Quoted 2 lines

We will probably consider dbus as is sounds much easier, but it is important to be able to do as much as what can be done through sdp api.

Why?

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw
Quoted 3 lines · Marcel Holtmann

actually using the standalone is a race condition. You should really consider switching to hcid -s. It also saves you some memory footprint.

Well, I'm lazy, I would like not to rewrite code...

Quoted 5 lines
Quoted 3 lines

We will probably consider dbus as is sounds much easier, but it is important to be able to do as much as what can be done through sdp api.

Why?

I wasn't clear, I meant having no regression in regards to what we actually use, doing exactly the same sdp records we have in pand, a2dpd, ...

Frederic

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#5 lore raw

Hi Frederic,

Quoted 4 lines
Quoted 3 lines

actually using the standalone is a race condition. You should really consider switching to hcid -s. It also saves you some memory footprint.

Well, I'm lazy, I would like not to rewrite code...

actually for this you don't have to rewrite anything. Simply use --disable-sdpd and then then call hcid -s on startup. That gives you the same SDP API as before. Except you have one daemon less to start and you no longer have race-conditions between hcid and sdpd.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

We will probably consider dbus as is sounds much easier, but it is important to be able to do as much as what can be done through sdp api.

Why?

I wasn't clear, I meant having no regression in regards to what we actually use, doing exactly the same sdp records we have in pand, a2dpd, ...

Since pand and sdpd will be removed at some point (don't worry, they will be around for quite some time), you might seriously consider the D-Bus API.

Anyhow, I think you found a real bug and might wanna fix the persistent versus non-persistent SDP record creation.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel